diff options
author | Howard Hinnant <hhinnant@apple.com> | 2011-12-12 18:16:10 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2011-12-12 18:16:10 +0000 |
commit | b5fea43d2d4953c953ed4dde24caedca4f4e9733 (patch) | |
tree | 20492c47abf2ec0e0b2ba698f0208db055568212 | |
parent | f270035a31a0abd92c1592ba0e87db0016127c3e (diff) |
Added dependent exception support to __cxa_current_exception_type
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@146381 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | src/cxa_exception.cpp | 6 | ||||
-rw-r--r-- | www/spec.html | 12 |
2 files changed, 11 insertions, 7 deletions
diff --git a/src/cxa_exception.cpp b/src/cxa_exception.cpp index 6022740..9cf61a9 100644 --- a/src/cxa_exception.cpp +++ b/src/cxa_exception.cpp @@ -305,7 +305,11 @@ std::type_info * __cxa_current_exception_type() { __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; } diff --git a/www/spec.html b/www/spec.html index a391a8d..dbc8fcb 100644 --- a/www/spec.html +++ b/www/spec.html @@ -189,9 +189,9 @@ being rethrown. </p> </blockquote> </td> -<td></td> -<td></td> -<td></td> +<td>✓</td> +<td>✓</td> +<td>✓</td> </tr> <tr> @@ -206,9 +206,9 @@ are no caught exceptions. </p> </blockquote> </td> -<td></td> -<td></td> -<td></td> +<td>✓</td> +<td>✓</td> +<td>✓</td> </tr> <tr> |