From 83e723a9c9fe5dbcb3ae0ec37bcef11d8924c0be Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Thu, 5 Dec 2013 19:38:42 +0000 Subject: [PATCH] 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. llvm-svn: 196527 --- clang/lib/Driver/Tools.cpp | 2 +- clang/test/Driver/darwin-objc-options.m | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index ae19be76082c..6e33e8f923a6 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 a90a12d733d6..3e21fb38c0a9 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