Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

Commit

Permalink
Changed my mind about __cxa_uncaught_exception and added it.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@148754 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Howard Hinnant committed Jan 24, 2012
1 parent 8f696ff commit ca6514d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 9 additions & 0 deletions src/cxa_exception.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,15 @@ __cxa_rethrow_primary_exception(void* thrown_object)
// 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
5 changes: 3 additions & 2 deletions www/spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>&#10003;</td>
<td>&#10003;</td>
<td>&#10003;</td>
</tr>

<tr>
Expand Down

0 comments on commit ca6514d

Please sign in to comment.