aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/TargetInfo.cpp
diff options
context:
space:
mode:
authorDavid Green <david.green@arm.com>2022-09-29 11:00:32 +0100
committerDavid Green <david.green@arm.com>2022-09-29 11:00:32 +0100
commit123064dc397d478a636ba1c5960d41ad381036a0 (patch)
tree6e48f83077c94d1d58ad53c29943ff1dff797325 /clang/lib/Basic/TargetInfo.cpp
parent0aced4e02b0bf4686733bb72859aaf93276e0d66 (diff)
downloadllvm-123064dc397d478a636ba1c5960d41ad381036a0.zip
llvm-123064dc397d478a636ba1c5960d41ad381036a0.tar.gz
llvm-123064dc397d478a636ba1c5960d41ad381036a0.tar.bz2
[Clang][Arm] Convert -fallow-half-arguments-and-returns to a target option. NFC
This cc1 option -fallow-half-arguments-and-returns allows __fp16 to be passed by argument and returned, without giving an error. It is currently always enabled for Arm and AArch64, by forcing the option in the driver. This means any cc1 tests (especially those needing arm_neon.h) need to specify the option too, to prevent the error from being emitted. This changes it to a target option instead, set to true for Arm and AArch64. This allows the option to be removed. Previously it was implied by -fnative_half_arguments_and_returns, which is set for certain languages like open_cl, renderscript and hlsl, so that option now too controls the errors. There were are few other non-arm uses of -fallow-half-arguments-and-returns but I believe they were unnecessary. The strictfp_builtins.c tests were converted from __fp16 to _Float16 to avoid the issues. Differential Revision: https://reviews.llvm.org/D133885
Diffstat (limited to 'clang/lib/Basic/TargetInfo.cpp')
-rw-r--r--clang/lib/Basic/TargetInfo.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Basic/TargetInfo.cpp b/clang/lib/Basic/TargetInfo.cpp
index 96138f3..d3ed57d 100644
--- a/clang/lib/Basic/TargetInfo.cpp
+++ b/clang/lib/Basic/TargetInfo.cpp
@@ -34,6 +34,7 @@ TargetInfo::TargetInfo(const llvm::Triple &T) : Triple(T) {
VLASupported = true;
NoAsmVariants = false;
HasLegalHalfType = false;
+ HalfArgsAndReturns = false;
HasFloat128 = false;
HasIbm128 = false;
HasFloat16 = false;