Cleanup error handling when TLS creation fails
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271235 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -176,11 +176,9 @@ __thread_specific_ptr<_Tp>::__thread_specific_ptr()
|
||||
int __ec = __libcpp_tl_create(
|
||||
&__key_,
|
||||
&__thread_specific_ptr::__at_thread_exit);
|
||||
#ifndef _LIBCPP_NO_EXCEPTIONS
|
||||
if (__ec)
|
||||
throw system_error(error_code(__ec, system_category()),
|
||||
__throw_system_error(__ec,
|
||||
"__thread_specific_ptr construction failed");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class _Tp>
|
||||
|
||||
Reference in New Issue
Block a user