]> granicus.if.org Git - clang/commitdiff
Fix assertion failure left over from changes to move away from "darwin" triples.
authorBob Wilson <bob.wilson@apple.com>
Thu, 5 Dec 2013 19:38:42 +0000 (19:38 +0000)
committerBob Wilson <bob.wilson@apple.com>
Thu, 5 Dec 2013 19:38:42 +0000 (19:38 +0000)
I happened to notice this while trying to write a test for an iOS simulator
target. I suspect we just missed this when we added separate "macosx" and "ios"
triples instead of the generic "darwin" OS.

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

lib/Driver/Tools.cpp
test/Driver/darwin-objc-options.m

index ae19be76082c73e29a3e042b2ef4d516788e6451..6e33e8f923a62931852c29a177d58d96ba60c7b1 100644 (file)
@@ -1594,7 +1594,7 @@ shouldUseExceptionTablesForObjCExceptions(const ObjCRuntime &runtime,
   if (runtime.isNonFragile())
     return true;
 
-  if (!Triple.isOSDarwin())
+  if (!Triple.isMacOSX())
     return false;
 
   return (!Triple.isMacOSXVersionLT(10,5) &&
index a90a12d733d6dbb688eee82487b2b4df6e803f6d..3e21fb38c0a953b702146767b07a0f84d0cd4b2f 100644 (file)
@@ -30,3 +30,6 @@
 // CHECK-CHECK-I386_IOS: -fexceptions
 // CHECK-CHECK-I386_IOS-NOT: -fobjc-dispatch-method
 // CHECK-CHECK-I386_IOS: darwin-objc-options
+
+// Don't crash with an unexpected target triple.
+// RUN: %clang -target i386-apple-ios7 -S -### %s