[cfe-commits] [libcxxabi] r148754 - in /libcxxabi/trunk: src/cxa_exception.cpp www/spec.html

Howard Hinnant hhinnant at apple.com
Mon Jan 23 16:01:31 PST 2012


Author: hhinnant
Date: Mon Jan 23 18:01:31 2012
New Revision: 148754

URL: http://llvm.org/viewvc/llvm-project?rev=148754&view=rev
Log:
Changed my mind about __cxa_uncaught_exception and added it.

Modified:
    libcxxabi/trunk/src/cxa_exception.cpp
    libcxxabi/trunk/www/spec.html

Modified: libcxxabi/trunk/src/cxa_exception.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_exception.cpp?rev=148754&r1=148753&r2=148754&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_exception.cpp (original)
+++ libcxxabi/trunk/src/cxa_exception.cpp Mon Jan 23 18:01:31 2012
@@ -505,6 +505,15 @@
     // If we return client will call terminate()
 }
 
+bool
+__cxa_uncaught_exception() throw()
+{
+    __cxa_eh_globals* globals = __cxa_get_globals_fast();
+    if (globals == 0)
+        return false;
+    return globals->uncaughtExceptions != 0;
+}
+
 }  // extern "C"
 
 }  // abi

Modified: libcxxabi/trunk/www/spec.html
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/www/spec.html?rev=148754&r1=148753&r2=148754&view=diff
==============================================================================
--- libcxxabi/trunk/www/spec.html (original)
+++ libcxxabi/trunk/www/spec.html Mon Jan 23 18:01:31 2012
@@ -354,8 +354,9 @@
 </p>
 </blockquote>
 </td>
-<td colspan="3">I don't think we want to do this.  <tt>__cxa_get_globals()</tt>
-is already exported and has this information.</td>
+<td>✓</td>
+<td>✓</td>
+<td>✓</td>
 </tr>
 
 <tr>





More information about the cfe-commits mailing list