mirror of
https://github.com/intel/llvm.git
synced 2026-02-04 03:26:06 +08:00
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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user