[cfe-commits] [libcxxabi] r146381 - in /libcxxabi/trunk: src/cxa_exception.cpp www/spec.html
Howard Hinnant
hhinnant at apple.com
Mon Dec 12 10:16:10 PST 2011
Author: hhinnant
Date: Mon Dec 12 12:16:10 2011
New Revision: 146381
URL: http://llvm.org/viewvc/llvm-project?rev=146381&view=rev
Log:
Added dependent exception support to __cxa_current_exception_type
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=146381&r1=146380&r2=146381&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_exception.cpp (original)
+++ libcxxabi/trunk/src/cxa_exception.cpp Mon Dec 12 12:16:10 2011
@@ -305,7 +305,11 @@
__cxa_exception *current_exception = globals->caughtExceptions;
if (NULL == current_exception)
return NULL; // No current exception
-// TODO add stuff for dependent exceptions.
+ if (isDependentException(¤t_exception->unwindHeader)) {
+ __cxa_dependent_exception* deh =
+ reinterpret_cast<__cxa_dependent_exception*>(current_exception + 1) - 1;
+ current_exception = static_cast<__cxa_exception*>(deh->primaryException) - 1;
+ }
return current_exception->exceptionType;
}
Modified: libcxxabi/trunk/www/spec.html
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/www/spec.html?rev=146381&r1=146380&r2=146381&view=diff
==============================================================================
--- libcxxabi/trunk/www/spec.html (original)
+++ libcxxabi/trunk/www/spec.html Mon Dec 12 12:16:10 2011
@@ -189,9 +189,9 @@
</p>
</blockquote>
</td>
-<td></td>
-<td></td>
-<td></td>
+<td>✓</td>
+<td>✓</td>
+<td>✓</td>
</tr>
<tr>
@@ -206,9 +206,9 @@
</p>
</blockquote>
</td>
-<td></td>
-<td></td>
-<td></td>
+<td>✓</td>
+<td>✓</td>
+<td>✓</td>
</tr>
<tr>
More information about the cfe-commits
mailing list