We unconditionally predefine these macros. However, they may be used to determine if the type is supported. In that case, there are unnecessary failures to compile the code.
This is the proposed fix for https://bugs.llvm.org/show_bug.cgi?id=40559
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Basic/Targets/WebAssembly.h | ||
---|---|---|
55 ↗ | (On Diff #184716) | There are test cases that check for the macros for WebAssembly so I assumed they probably want the type to be valid on the target. If that's not the case, I can change the test case. |
I think WebAssembly is in the same situation as most other architectures, as discussed here:
http://llvm.org/viewvc/llvm-project?view=revision&revision=352221
and should not enable _Float16 yet. The test/Preprocessor/init.c tests were semi-automatically generated, so it wasn't specifically intended to include tests for FLT16 macros for WebAssembly.
As mentioned in a comment, the WASM tests weren't really meant to indicate that WASM supports the type. Removed the changes to the WASM target.
Does anyone have any further comments or objections to this patch? I would like to commit this and close the PR.
Looks okay to me, with one nit inline.
test/Preprocessor/init.c | ||
---|---|---|
9169 ↗ | (On Diff #185088) | Perhaps change this in WEBASSEMBLY-NOT so that we also have one negative test for this? |
Since I haven't seen any further objections to this, I'll commit this later today.
test/Preprocessor/init.c | ||
---|---|---|
9169 ↗ | (On Diff #185088) | I will do this on the commit. |