diff options
| author | John McCall <rjmccall@apple.com> | 2011-07-06 01:22:26 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2011-07-06 01:22:26 +0000 |
| commit | 9de1978f6e03619f5ca292a1525279a3d5a98c7a (patch) | |
| tree | cf20cb67825fbb6dddc0ee806662dc90d42c277f /clang/lib/Driver/ToolChains.cpp | |
| parent | 6dd2417dbeac1716e0c0af9e0c156d61f47850c1 (diff) | |
| download | bcm5719-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/ToolChains.cpp')
| -rw-r--r-- | clang/lib/Driver/ToolChains.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp index 68ebc1b6b35..1619ef8f84a 100644 --- a/clang/lib/Driver/ToolChains.cpp +++ b/clang/lib/Driver/ToolChains.cpp @@ -99,6 +99,13 @@ void Darwin::configureObjCRuntime(ObjCRuntime &runtime) const { return ToolChain::configureObjCRuntime(runtime); runtime.HasARC = runtime.HasWeak = hasARCRuntime(); + + // So far, objc_terminate is only available in iOS 5. + // FIXME: do the simulator logic properly. + if (!ARCRuntimeForSimulator && isTargetIPhoneOS()) + runtime.HasTerminate = !isIPhoneOSVersionLT(5); + else + runtime.HasTerminate = false; } // FIXME: Can we tablegen this? |

