Updated __cxa_current_exception_type to call __cxa_get_globals_fast - will not allocate globals

llvm-svn: 147147
This commit is contained in:
Marshall Clow 2011-12-22 15:45:05 +00:00
parent ed2e53222f
commit 1de4fc0dfa
2 changed files with 4 additions and 2 deletions

View File

@ -16,7 +16,7 @@ N: Marshall Clow
E: marshall@idio.com
E: mclow.lists@gmail.com
E: mclow@qualcomm.com
D: Aux Runtime and vector functionality
D: Aux Runtime and vector functionality, exception handling
N: Nick Kledzik
E: kledzik@apple.com

View File

@ -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