Skip to content

Commit e33b2f5

Browse files
author
Howard Hinnant
committed
Changed my mind about __cxa_uncaught_exception and added it.
llvm-svn: 148754
1 parent 3771528 commit e33b2f5

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

libcxxabi/src/cxa_exception.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,15 @@ __cxa_rethrow_primary_exception(void* thrown_object)
505505
// If we return client will call terminate()
506506
}
507507

508+
bool
509+
__cxa_uncaught_exception() throw()
510+
{
511+
__cxa_eh_globals* globals = __cxa_get_globals_fast();
512+
if (globals == 0)
513+
return false;
514+
return globals->uncaughtExceptions != 0;
515+
}
516+
508517
} // extern "C"
509518

510519
} // abi

libcxxabi/www/spec.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,9 @@
354354
</p>
355355
</blockquote>
356356
</td>
357-
<td colspan="3">I don't think we want to do this. <tt>__cxa_get_globals()</tt>
358-
is already exported and has this information.</td>
357+
<td>&#10003;</td>
358+
<td>&#10003;</td>
359+
<td>&#10003;</td>
359360
</tr>
360361

361362
<tr>

0 commit comments

Comments
 (0)