[cfe-commits] [libcxxabi] r147492 - /libcxxabi/trunk/src/cxa_exception.cpp

Marshall Clow mclow at qualcomm.com
Tue Jan 3 15:10:20 PST 2012


Author: marshall
Date: Tue Jan  3 17:10:20 2012
New Revision: 147492

URL: http://llvm.org/viewvc/llvm-project?rev=147492&view=rev
Log:
Don't allocate TLS storage when checking to see if an exception has been thrown

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=147492&r1=147491&r2=147492&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_exception.cpp (original)
+++ libcxxabi/trunk/src/cxa_exception.cpp Tue Jan  3 17:10:20 2012
@@ -387,6 +387,8 @@
 {
 //  get the current exception
     __cxa_eh_globals* globals = __cxa_get_globals();
+    if (NULL == globals)
+        return NULL;        //  Never has been an exception
     __cxa_exception* current_exception = globals->caughtExceptions;
     if (NULL == current_exception)
         return NULL;        //  No current exception





More information about the cfe-commits mailing list