Cleanup error handling when TLS creation fails
llvm-svn: 271235
diff --git a/libcxx/include/thread b/libcxx/include/thread
index 3ce32fc..022021c 100644
--- a/libcxx/include/thread
+++ b/libcxx/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>