summaryrefslogtreecommitdiffstats
path: root/libcxxabi/src/cxa_exception.cpp
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2015-06-02 13:03:17 +0000
committerMarshall Clow <mclow.lists@gmail.com>2015-06-02 13:03:17 +0000
commit604de5c25610bed3ed2b107f6be9ca731f75721b (patch)
tree06ebe2edfa3922e107c05d8e783e861d9953bff1 /libcxxabi/src/cxa_exception.cpp
parent8e9c266a77a80d2de23433a4e5f35c23eb744fe6 (diff)
downloadbcm5719-llvm-604de5c25610bed3ed2b107f6be9ca731f75721b.tar.gz
bcm5719-llvm-604de5c25610bed3ed2b107f6be9ca731f75721b.zip
Implement uncaught_exceptions() to get a count, rather than a bool. Update the libc++abi version. Reviewed as http://reviews.llvm.org/D10067
llvm-svn: 238827
Diffstat (limited to 'libcxxabi/src/cxa_exception.cpp')
-rw-r--r--libcxxabi/src/cxa_exception.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/libcxxabi/src/cxa_exception.cpp b/libcxxabi/src/cxa_exception.cpp
index b7a33d716c4..ae2b39ca60a 100644
--- a/libcxxabi/src/cxa_exception.cpp
+++ b/libcxxabi/src/cxa_exception.cpp
@@ -710,13 +710,16 @@ __cxa_rethrow_primary_exception(void* thrown_object)
}
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;
- return globals->uncaughtExceptions != 0;
+ return 0;
+ return globals->uncaughtExceptions;
}
} // extern "C"
OpenPOWER on IntegriCloud