diff options
author | Akira Hatanaka <ahatanaka@apple.com> | 2015-08-26 19:00:11 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@apple.com> | 2015-08-26 19:00:11 +0000 |
commit | 6b46f883bef02a28d8b509ce44b425bf7ef6e8a9 (patch) | |
tree | e880926f6bd1f477569f3f42f9c1d04c71609eac /test/Driver/arm-float-abi.c | |
parent | 5b814caf74886b197ed1bf81a0336461f64cb5de (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246054 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Driver/arm-float-abi.c')
-rw-r--r-- | test/Driver/arm-float-abi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Driver/arm-float-abi.c b/test/Driver/arm-float-abi.c new file mode 100644 index 0000000000..e5b42c9696 --- /dev/null +++ b/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 |