Skip to content

Commit 7fcad54

Browse files
author
Howard Hinnant
committed
Added dependent exception support to __cxa_current_exception_type
llvm-svn: 146381
1 parent 0444370 commit 7fcad54

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

libcxxabi/src/cxa_exception.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,11 @@ std::type_info * __cxa_current_exception_type() {
305305
__cxa_exception *current_exception = globals->caughtExceptions;
306306
if (NULL == current_exception)
307307
return NULL; // No current exception
308-
// TODO add stuff for dependent exceptions.
308+
if (isDependentException(&current_exception->unwindHeader)) {
309+
__cxa_dependent_exception* deh =
310+
reinterpret_cast<__cxa_dependent_exception*>(current_exception + 1) - 1;
311+
current_exception = static_cast<__cxa_exception*>(deh->primaryException) - 1;
312+
}
309313
return current_exception->exceptionType;
310314
}
311315

libcxxabi/www/spec.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,9 @@
189189
</p>
190190
</blockquote>
191191
</td>
192-
<td></td>
193-
<td></td>
194-
<td></td>
192+
<td>&#10003;</td>
193+
<td>&#10003;</td>
194+
<td>&#10003;</td>
195195
</tr>
196196

197197
<tr>
@@ -206,9 +206,9 @@
206206
</p>
207207
</blockquote>
208208
</td>
209-
<td></td>
210-
<td></td>
211-
<td></td>
209+
<td>&#10003;</td>
210+
<td>&#10003;</td>
211+
<td>&#10003;</td>
212212
</tr>
213213

214214
<tr>

0 commit comments

Comments
 (0)