summaryrefslogtreecommitdiffstats
path: root/libcxxabi/src/cxa_exception.cpp
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2011-12-06 19:02:03 +0000
committerHoward Hinnant <hhinnant@apple.com>2011-12-06 19:02:03 +0000
commitdfb34fcb1abec24f037ea908ef959783dd361b79 (patch)
tree7b8fbbfb661049db401b83a96cb4cd0150b55bcf /libcxxabi/src/cxa_exception.cpp
parent1ad92487ff566d2dee36e7911da6db506993fda7 (diff)
downloadbcm5719-llvm-dfb34fcb1abec24f037ea908ef959783dd361b79.tar.gz
bcm5719-llvm-dfb34fcb1abec24f037ea908ef959783dd361b79.zip
Substituted std::get_terminate() for direct access to the handler function pointer (which is now a static in cxa_handlers.cpp). This has the advantage of going through the atomic API and so is less likely to cause a data race. Ditto for unexpected.
llvm-svn: 145951
Diffstat (limited to 'libcxxabi/src/cxa_exception.cpp')
-rw-r--r--libcxxabi/src/cxa_exception.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxxabi/src/cxa_exception.cpp b/libcxxabi/src/cxa_exception.cpp
index f1679bb66fe..3e20c16d95d 100644
--- a/libcxxabi/src/cxa_exception.cpp
+++ b/libcxxabi/src/cxa_exception.cpp
@@ -194,8 +194,8 @@ __cxa_throw(void * thrown_exception, std::type_info * tinfo, void (*dest)(void *
__cxa_eh_globals *globals = __cxa_get_globals();
__cxa_exception *exception = exception_from_thrown_object(thrown_exception);
- exception->unexpectedHandler = __cxxabiapple::__cxa_unexpected_handler;
- exception->terminateHandler = __cxxabiapple::__cxa_terminate_handler;
+ exception->unexpectedHandler = std::get_unexpected();
+ exception->terminateHandler = std::get_terminate();
exception->exceptionType = tinfo;
exception->exceptionDestructor = dest;
setExceptionClass(&exception->unwindHeader);
OpenPOWER on IntegriCloud