summaryrefslogtreecommitdiffstats
path: root/libcxxabi/src/cxa_exception.cpp
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2012-01-24 00:01:31 +0000
committerHoward Hinnant <hhinnant@apple.com>2012-01-24 00:01:31 +0000
commite33b2f5c97a61f53dc61bed8b82bf86b66001ce5 (patch)
treecf835c64782b58a99dcf67b2a9cea46090effcff /libcxxabi/src/cxa_exception.cpp
parent377152870bfab5be47efec98ca13d41a67b61c7e (diff)
downloadbcm5719-llvm-e33b2f5c97a61f53dc61bed8b82bf86b66001ce5.tar.gz
bcm5719-llvm-e33b2f5c97a61f53dc61bed8b82bf86b66001ce5.zip
Changed my mind about __cxa_uncaught_exception and added it.
llvm-svn: 148754
Diffstat (limited to 'libcxxabi/src/cxa_exception.cpp')
-rw-r--r--libcxxabi/src/cxa_exception.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/libcxxabi/src/cxa_exception.cpp b/libcxxabi/src/cxa_exception.cpp
index 96868f5aff2..ba4f84dbdc6 100644
--- a/libcxxabi/src/cxa_exception.cpp
+++ b/libcxxabi/src/cxa_exception.cpp
@@ -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
OpenPOWER on IntegriCloud