Cleanup error handling when TLS creation fails
llvm-svn: 271235
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 424b5ee8f7d8139b3893fd8577062c0d4482b52a
diff --git a/include/thread b/include/thread
index 3ce32fc..022021c 100644
--- a/include/thread
+++ b/include/thread
@@ -176,11 +176,9 @@
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>