]> granicus.if.org Git - clang/commitdiff
ARMv7k: simplify logic for deciding sjlj-exceptions.
authorTim Northover <tnorthover@apple.com>
Wed, 27 Jan 2016 22:14:02 +0000 (22:14 +0000)
committerTim Northover <tnorthover@apple.com>
Wed, 27 Jan 2016 22:14:02 +0000 (22:14 +0000)
Slight change of behaviour in the odd armv7+watchos case, which should match
the other runtime components.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258994 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains.cpp
test/Driver/arch-armv7k.c

index 4f72a96ace297512ae77a2e3d97e5c76533e5851..45cd8bdb29cad6ce591e37339c5b02db4580708e 100644 (file)
@@ -1076,8 +1076,7 @@ bool Darwin::UseSjLjExceptions(const ArgList &Args) const {
 
   // Only watchOS uses the new DWARF/Compact unwinding method.
   llvm::Triple Triple(ComputeLLVMTriple(Args));
-  return !(Triple.getArchName() == "armv7k" ||
-           Triple.getArchName() == "thumbv7k") && !isTargetWatchOS();
+  return !Triple.isWatchABI();
 }
 
 bool MachO::isPICDefault() const { return true; }
index 24a1851bc584ca9c843faaebbd07105448d60420..5ebdd388abda54e2c5ecfab586a53bf8e667a38a 100644 (file)
@@ -9,3 +9,6 @@
 // match.
 
 // RUN: %clang -target x86_64-apple-macosx10.9 -arch armv7k -miphoneos-version-min=9.0 -c %s -### 2>&1 | FileCheck %s
+
+// RUN: %clang -target x86_64-apple-macosx10.9 -arch armv7 -mwatchos-version-min=9.0 -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SJLJ
+// CHECK-SJLJ: "-fsjlj-exceptions"