diff options
author | Howard Hinnant <hhinnant@apple.com> | 2012-01-25 03:42:30 +0400 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2012-01-25 03:42:30 +0400 |
commit | abc770690a70c49c947e684bcfa10cce3ac24522 (patch) | |
tree | 50bce111e7a1ea85773221e936a99e81d9ed3b90 /libcxxabi/src/cxa_exception_storage.cpp | |
parent | 1b8e437ab63e1487dfef32e9dbd1b3b10496c80f (diff) |
By changing all of the throw() specs to noexcept I've been able to compile and link all of the source files into a dylib. Prior to this substitution the changed functions were calling __cxa_call_unexpected which isn't implemented yet. However in none of these cases do we actaully want __cxa_call_unexpected to be called. Primative buildit script added.
llvm-svn: 148880
Diffstat (limited to 'libcxxabi/src/cxa_exception_storage.cpp')
-rw-r--r-- | libcxxabi/src/cxa_exception_storage.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libcxxabi/src/cxa_exception_storage.cpp b/libcxxabi/src/cxa_exception_storage.cpp index d648f295b341..4e06c066b702 100644 --- a/libcxxabi/src/cxa_exception_storage.cpp +++ b/libcxxabi/src/cxa_exception_storage.cpp @@ -18,15 +18,15 @@ namespace __cxxabiv1 { namespace { - __cxa_eh_globals * __globals () throw () { + __cxa_eh_globals * __globals () noexcept { static thread_local __cxa_eh_globals eh_globals; return &eh_globals; } } extern "C" { - __cxa_eh_globals * __cxa_get_globals () throw() { return __globals (); } - __cxa_eh_globals * __cxa_get_globals_fast () throw() { return __globals (); } + __cxa_eh_globals * __cxa_get_globals () noexcept { return __globals (); } + __cxa_eh_globals * __cxa_get_globals_fast () noexcept { return __globals (); } } } @@ -44,13 +44,13 @@ namespace __cxxabiv1 { namespace { pthread_key_t key_; - void destruct_ (void *p) throw () { + void destruct_ (void *p) noexcept { std::free ( p ); if ( 0 != ::pthread_setspecific ( key_, NULL ) ) abort_message("cannot zero out thread value for __cxa_get_globals()"); } - int construct_ () throw () { + int construct_ () noexcept { if ( 0 != pthread_key_create ( &key_, destruct_ ) ) abort_message("cannot create pthread key for __cxa_get_globals()"); return 0; @@ -58,7 +58,7 @@ namespace { } extern "C" { - __cxa_eh_globals * __cxa_get_globals () throw () { + __cxa_eh_globals * __cxa_get_globals () noexcept { // Try to get the globals for this thread __cxa_eh_globals* retVal = __cxa_get_globals_fast (); @@ -75,7 +75,7 @@ extern "C" { return retVal; } - __cxa_eh_globals * __cxa_get_globals_fast () throw () { + __cxa_eh_globals * __cxa_get_globals_fast () noexcept { // First time through, create the key. static int init = construct_(); return static_cast<__cxa_eh_globals*>(::pthread_getspecific(key_)); |