From 9de1978f6e03619f5ca292a1525279a3d5a98c7a Mon Sep 17 00:00:00 2001 From: John McCall Date: Wed, 6 Jul 2011 01:22:26 +0000 Subject: 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 --- clang/lib/Driver/Tools.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/lib/Driver/Tools.cpp') 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: -- cgit v1.2.3