summaryrefslogtreecommitdiffstats
path: root/libcxxabi/src/cxa_exception.cpp
diff options
context:
space:
mode:
authorMarshall Clow <mclow@qualcomm.com>2011-12-22 15:45:05 +0000
committerMarshall Clow <mclow@qualcomm.com>2011-12-22 15:45:05 +0000
commit1de4fc0dfa9ee9f3bf2d7dfa7b8730740ac61b83 (patch)
tree2f28e98e691cc61dc3bab67a4c674a37cc80be3b /libcxxabi/src/cxa_exception.cpp
parented2e53222f1a55875dd6cec8c7578fe4c808fd7a (diff)
downloadbcm5719-llvm-1de4fc0dfa9ee9f3bf2d7dfa7b8730740ac61b83.tar.gz
bcm5719-llvm-1de4fc0dfa9ee9f3bf2d7dfa7b8730740ac61b83.zip
Updated __cxa_current_exception_type to call __cxa_get_globals_fast - will not allocate globals
llvm-svn: 147147
Diffstat (limited to 'libcxxabi/src/cxa_exception.cpp')
-rw-r--r--libcxxabi/src/cxa_exception.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libcxxabi/src/cxa_exception.cpp b/libcxxabi/src/cxa_exception.cpp
index 2ee146ab28b..77ac7c56fb9 100644
--- a/libcxxabi/src/cxa_exception.cpp
+++ b/libcxxabi/src/cxa_exception.cpp
@@ -296,7 +296,9 @@ void __cxa_end_catch() {
std::type_info * __cxa_current_exception_type() {
// get the current exception
- __cxa_eh_globals *globals = __cxa_get_globals();
+ __cxa_eh_globals *globals = __cxa_get_globals_fast();
+ if (NULL == globals)
+ return NULL; // If there have never been any exceptions, there are none now.
__cxa_exception *current_exception = globals->caughtExceptions;
if (NULL == current_exception)
return NULL; // No current exception
OpenPOWER on IntegriCloud