From: Tim Northover Date: Wed, 27 Jan 2016 22:14:02 +0000 (+0000) Subject: ARMv7k: simplify logic for deciding sjlj-exceptions. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3df2d70e2453b1a8b9f8267e64bb4cee5821579d;p=clang ARMv7k: simplify logic for deciding sjlj-exceptions. 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 --- diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 4f72a96ace..45cd8bdb29 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -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; } diff --git a/test/Driver/arch-armv7k.c b/test/Driver/arch-armv7k.c index 24a1851bc5..5ebdd388ab 100644 --- a/test/Driver/arch-armv7k.c +++ b/test/Driver/arch-armv7k.c @@ -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"