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

Marshall Clow mclow at qualcomm.com
Wed Jan 4 14:18:11 PST 2012


Author: marshall
Date: Wed Jan  4 16:18:10 2012
New Revision: 147554

URL: http://llvm.org/viewvc/llvm-project?rev=147554&view=rev
Log:
Improved comment to explain why we can use __cxa_get_globals_fast here

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=147554&r1=147553&r2=147554&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_exception.cpp (original)
+++ libcxxabi/trunk/src/cxa_exception.cpp Wed Jan  4 16:18:10 2012
@@ -381,6 +381,10 @@
     Returns a pointer to the thrown object (if any) at the top of the
     caughtExceptions stack.  Atommically increment the exception's referenceCount.
     If there is no such thrown object, returns null.
+
+    We can use __cxa_get_globals_fast here to get the globals because if there have
+    been no exceptions thrown, ever, on this thread, we can return NULL without 
+    the need to allocate the exception-handling globals.
 */
 void*
 __cxa_current_primary_exception() throw()





More information about the cfe-commits mailing list