From 256a76e0b0e0c9e65a3122917d553ef10bc84d29 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134456 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Driver/Tools.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/Driver/Tools.cpp') diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index d0fd914bf0..d4d41d28d5 100644 --- a/lib/Driver/Tools.cpp +++ b/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-70-g09d2