[cfe-commits] [libcxxabi] r147147 - in /libcxxabi/trunk: CREDITS.TXT src/cxa_exception.cpp
Marshall Clow
mclow at qualcomm.com
Thu Dec 22 07:45:05 PST 2011
Author: marshall
Date: Thu Dec 22 09:45:05 2011
New Revision: 147147
URL: http://llvm.org/viewvc/llvm-project?rev=147147&view=rev
Log:
Updated __cxa_current_exception_type to call __cxa_get_globals_fast - will not allocate globals
Modified:
libcxxabi/trunk/CREDITS.TXT
libcxxabi/trunk/src/cxa_exception.cpp
Modified: libcxxabi/trunk/CREDITS.TXT
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/CREDITS.TXT?rev=147147&r1=147146&r2=147147&view=diff
==============================================================================
--- libcxxabi/trunk/CREDITS.TXT (original)
+++ libcxxabi/trunk/CREDITS.TXT Thu Dec 22 09:45:05 2011
@@ -16,7 +16,7 @@
E: marshall at idio.com
E: mclow.lists at gmail.com
E: mclow at qualcomm.com
-D: Aux Runtime and vector functionality
+D: Aux Runtime and vector functionality, exception handling
N: Nick Kledzik
E: kledzik at apple.com
Modified: libcxxabi/trunk/src/cxa_exception.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_exception.cpp?rev=147147&r1=147146&r2=147147&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_exception.cpp (original)
+++ libcxxabi/trunk/src/cxa_exception.cpp Thu Dec 22 09:45:05 2011
@@ -296,7 +296,9 @@
std::type_info * __cxa_current_exception_type() {
// get the current exception
- __cxa_eh_globals *globals = __cxa_get_globals();
+ __cxa_eh_globals *globals = __cxa_get_globals_fast();
+ if (NULL == globals)
+ return NULL; // If there have never been any exceptions, there are none now.
__cxa_exception *current_exception = globals->caughtExceptions;
if (NULL == current_exception)
return NULL; // No current exception
More information about the cfe-commits
mailing list