summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-07-06 01:22:26 +0000
committerJohn McCall <rjmccall@apple.com>2011-07-06 01:22:26 +0000
commit9de1978f6e03619f5ca292a1525279a3d5a98c7a (patch)
treecf20cb67825fbb6dddc0ee806662dc90d42c277f /clang/lib/Driver/Tools.cpp
parent6dd2417dbeac1716e0c0af9e0c156d61f47850c1 (diff)
downloadbcm5719-llvm-9de1978f6e03619f5ca292a1525279a3d5a98c7a.tar.gz
bcm5719-llvm-9de1978f6e03619f5ca292a1525279a3d5a98c7a.zip
Call objc_terminate() instead of abort() when a cleanup throws an
exception in Objective-C; in Objective-C++ we still use std::terminate(). This is only available in very recent runtimes. llvm-svn: 134456
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index d0fd914bf0d..d4d41d28d53 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -1781,6 +1781,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-fobjc-runtime-has-arc");
if (objCRuntime.HasWeak)
CmdArgs.push_back("-fobjc-runtime-has-weak");
+ if (objCRuntime.HasTerminate)
+ CmdArgs.push_back("-fobjc-runtime-has-terminate");
// Compute the Objective-C ABI "version" to use. Version numbers are
// slightly confusing for historical reasons:
OpenPOWER on IntegriCloud