Skip to content
Commit fad744dd authored by Howard Hinnant's avatar Howard Hinnant
Browse files

A lot of the code in cxa_exception.cpp depends on __cxa_get_globals_fast()...

A lot of the code in cxa_exception.cpp depends on __cxa_get_globals_fast() returning null if __cxa_get_globals() hasn't been called yet.  However it doesn't reliably do that, at least on OS X if __cxa_get_globals_fast() is called prior to pthread_key_create() running.  Our choice is to either limit our use of __cxa_get_globals_fast() more than we have, or to have __cxa_get_globals_fast() initialize with pthread_key_create() if necessary.  I chose the latter, and replaced pthread_once with a C++11 local static (which should do the same thing).

llvm-svn: 148750
parent 671caae8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment