diff options
| author | Tim Northover <tnorthover@apple.com> | 2015-11-17 18:27:27 +0000 |
|---|---|---|
| committer | Tim Northover <tnorthover@apple.com> | 2015-11-17 18:27:27 +0000 |
| commit | c741b04d1ee25450c2c9df936b6df39762a775ee (patch) | |
| tree | fad2d23b18905d9288d9e383fd913afaad1949bc /clang/test | |
| parent | 3ac8a5abbfe152484383b6793c84188c71297bfb (diff) | |
| download | bcm5719-llvm-c741b04d1ee25450c2c9df936b6df39762a775ee.tar.gz bcm5719-llvm-c741b04d1ee25450c2c9df936b6df39762a775ee.zip | |
ARM: fix mismatch between Clang and backend on exception type.
"-arch armv7k" is only normally used with a watchos target, but Clang doesn't
stop you from giving a "-miphoneos-version-min" option too, converting the
triple to "thumbv7k-apple-ios". In this case the backend will decide to use
SjLj exceptions, so Clang needs to agree so it can create the correct
predefines.
Fortunately, there's a handy function to make the decision for us now.
llvm-svn: 253355
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Driver/arch-armv7k.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/clang/test/Driver/arch-armv7k.c b/clang/test/Driver/arch-armv7k.c index 190d8999ab6..f5c33cfd9f5 100644 --- a/clang/test/Driver/arch-armv7k.c +++ b/clang/test/Driver/arch-armv7k.c @@ -1,5 +1,13 @@ -// Tests that make sure armv7k is mapped to the correct CPU +// Tests that make sure armv7k is mapped to the correct CPU and ABI choices // RUN: %clang -target x86_64-apple-macosx10.9 -arch armv7k -c %s -### 2>&1 | FileCheck %s // CHECK: "-cc1"{{.*}} "-target-cpu" "cortex-a7" // CHECK-NOT: "-fsjlj-exceptions" + +// "thumbv7k-apple-ios" is a bit of a weird triple, but since the backend is +// going to choose to use sjlj-based exceptions for it, the front-end needs to +// match. + +// RUN: %clang -target x86_64-apple-macosx10.9 -arch armv7k -miphoneos-version-min=9.0 -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SJLJ +// CHECK-SJLJ: "-cc1"{{.*}} "-target-cpu" "cortex-a7" +// CHECK-SJLJ: "-fsjlj-exceptions" |

