r196527 - Fix assertion failure left over from changes to move away from "darwin" triples.
Bob Wilson
bob.wilson at apple.com
Thu Dec 5 11:38:43 PST 2013
Author: bwilson
Date: Thu Dec 5 13:38:42 2013
New Revision: 196527
URL: http://llvm.org/viewvc/llvm-project?rev=196527&view=rev
Log:
Fix assertion failure left over from changes to move away from "darwin" triples.
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.
Modified:
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/Driver/darwin-objc-options.m
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=196527&r1=196526&r2=196527&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Thu Dec 5 13:38:42 2013
@@ -1594,7 +1594,7 @@ shouldUseExceptionTablesForObjCException
if (runtime.isNonFragile())
return true;
- if (!Triple.isOSDarwin())
+ if (!Triple.isMacOSX())
return false;
return (!Triple.isMacOSXVersionLT(10,5) &&
Modified: cfe/trunk/test/Driver/darwin-objc-options.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/darwin-objc-options.m?rev=196527&r1=196526&r2=196527&view=diff
==============================================================================
--- cfe/trunk/test/Driver/darwin-objc-options.m (original)
+++ cfe/trunk/test/Driver/darwin-objc-options.m Thu Dec 5 13:38:42 2013
@@ -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
More information about the cfe-commits
mailing list