summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChains.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2015-11-17 18:27:27 +0000
committerTim Northover <tnorthover@apple.com>2015-11-17 18:27:27 +0000
commitc741b04d1ee25450c2c9df936b6df39762a775ee (patch)
treefad2d23b18905d9288d9e383fd913afaad1949bc /clang/lib/Driver/ToolChains.cpp
parent3ac8a5abbfe152484383b6793c84188c71297bfb (diff)
downloadbcm5719-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/lib/Driver/ToolChains.cpp')
-rw-r--r--clang/lib/Driver/ToolChains.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp
index d1ce3f4f1f1..ed223219f65 100644
--- a/clang/lib/Driver/ToolChains.cpp
+++ b/clang/lib/Driver/ToolChains.cpp
@@ -1053,12 +1053,8 @@ bool Darwin::UseSjLjExceptions(const ArgList &Args) const {
getTriple().getArch() != llvm::Triple::thumb)
return false;
- // We can't check directly for watchOS here. ComputeLLVMTriple only
- // fills in the ArchName correctly.
- llvm::Triple Triple(ComputeLLVMTriple(Args));
- return !(Triple.getArchName() == "armv7k" ||
- Triple.getArchName() == "thumbv7k");
-
+ // Only watchOS uses the new DWARF/Compact unwinding method.
+ return !isTargetWatchOS();
}
bool MachO::isPICDefault() const { return true; }
OpenPOWER on IntegriCloud