summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/Driver/Tools.cpp2
-rw-r--r--clang/test/Driver/darwin-objc-options.m3
2 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index ae19be76082..6e33e8f923a 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -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) &&
diff --git a/clang/test/Driver/darwin-objc-options.m b/clang/test/Driver/darwin-objc-options.m
index a90a12d733d..3e21fb38c0a 100644
--- a/clang/test/Driver/darwin-objc-options.m
+++ b/clang/test/Driver/darwin-objc-options.m
@@ -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
OpenPOWER on IntegriCloud