[PATCH] Add a new routine to libc++abi to get the number of uncaught exceptions
Sebastian Redl
sebastian.redl at getdesigned.at
Mon Jun 1 00:24:03 PDT 2015
On 30.05.2015 01:09, Marshall Clow wrote:
> Added basic tests.
> Bumped the version # for libc++abi
>
>
> http://reviews.llvm.org/D10067
>
> Files:
> include/cxxabi.h
> src/cxa_exception.cpp
> test/uncaught_exceptions.pass.cpp
>
> Index: src/cxa_exception.cpp
> ===================================================================
> --- src/cxa_exception.cpp
> +++ src/cxa_exception.cpp
> @@ -710,13 +710,16 @@
> }
>
> bool
> -__cxa_uncaught_exception() throw()
> +__cxa_uncaught_exception() throw() { return __cxa_uncaught_exceptions() != 0; }
> +
> +unsigned int
> +__cxa_uncaught_exceptions() throw()
> {
> // This does not report foreign exceptions in flight
> __cxa_eh_globals* globals = __cxa_get_globals_fast();
> if (globals == 0)
> return false;
This should return 0.
Sebastian
More information about the cfe-commits
mailing list