[cfe-commits] [libcxxabi] r145951 - /libcxxabi/trunk/src/cxa_exception.cpp
Howard Hinnant
hhinnant at apple.com
Tue Dec 6 11:02:03 PST 2011
Author: hhinnant
Date: Tue Dec 6 13:02:03 2011
New Revision: 145951
URL: http://llvm.org/viewvc/llvm-project?rev=145951&view=rev
Log:
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.
Modified:
libcxxabi/trunk/src/cxa_exception.cpp
Modified: libcxxabi/trunk/src/cxa_exception.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_exception.cpp?rev=145951&r1=145950&r2=145951&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_exception.cpp (original)
+++ libcxxabi/trunk/src/cxa_exception.cpp Tue Dec 6 13:02:03 2011
@@ -194,8 +194,8 @@
__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);
More information about the cfe-commits
mailing list