summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/arm-float-abi.c
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@apple.com>2015-08-26 19:00:11 +0000
committerAkira Hatanaka <ahatanaka@apple.com>2015-08-26 19:00:11 +0000
commit9d99bb50c43689d13792cfc9bcece7e178d9b7fc (patch)
treeab490892568aa5f30583214cc6cea6276b194e1a /clang/test/Driver/arm-float-abi.c
parent9d692b6805243a96bcd98fbbaa097f4908d76063 (diff)
downloadbcm5719-llvm-9d99bb50c43689d13792cfc9bcece7e178d9b7fc.tar.gz
bcm5719-llvm-9d99bb50c43689d13792cfc9bcece7e178d9b7fc.zip
[ARM] Error out if float-ab=hard and abi=apcs-gnu on macho platforms.
Error out if -mfloat-abi=hard or -mhard-float is specified on the command line and the target ABI is APCS. Previously clang issued no warnings or errors and just passed the option to the backend, which had no effect on code generation for targets using APCS. This commit corrects the patch commited in r245866, which didn't take into account the fact that not all darwin targets use APCS. rdar://problem/22257950 http://reviews.llvm.org/D12344 llvm-svn: 246054
Diffstat (limited to 'clang/test/Driver/arm-float-abi.c')
-rw-r--r--clang/test/Driver/arm-float-abi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Driver/arm-float-abi.c b/clang/test/Driver/arm-float-abi.c
new file mode 100644
index 00000000000..e5b42c96960
--- /dev/null
+++ b/clang/test/Driver/arm-float-abi.c
@@ -0,0 +1,6 @@
+// RUN: not %clang %s -target armv7-apple-ios -mfloat-abi=hard 2>&1 | FileCheck -check-prefix=ARMV7-ERROR %s
+// RUN: %clang %s -target armv7-apple-ios -mfloat-abi=softfp -### 2>&1 | FileCheck -check-prefix=NOERROR %s
+// RUN: %clang %s -arch armv7 -target thumbv7-apple-darwin-eabi -mfloat-abi=hard -### 2>&1 | FileCheck -check-prefix=NOERROR %s
+
+// ARMV7-ERROR: unsupported option '-mfloat-abi=hard' for target 'thumbv7'
+// NOERROR-NOT: unsupported option
OpenPOWER on IntegriCloud