From 6da1f17beaf658f49341dd90c2fa3723a78be49d 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196527 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Driver/Tools.cpp | 2 +- test/Driver/darwin-objc-options.m | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index ae19be7608..6e33e8f923 100644 --- a/lib/Driver/Tools.cpp +++ b/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/test/Driver/darwin-objc-options.m b/test/Driver/darwin-objc-options.m index a90a12d733..3e21fb38c0 100644 --- a/test/Driver/darwin-objc-options.m +++ b/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 -- 2.40.0