now works with -fno-exceptions and -fno-rtti
llvm-svn: 110828
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 54b409fdb9489b305bf95f4d4f52b49c7926c429
diff --git a/src/thread.cpp b/src/thread.cpp
index f2db6d5..de53f78 100644
--- a/src/thread.cpp
+++ b/src/thread.cpp
@@ -24,8 +24,10 @@
thread::join()
{
int ec = pthread_join(__t_, 0);
+#ifndef _LIBCPP_NO_EXCEPTIONS
if (ec)
throw system_error(error_code(ec, system_category()), "thread::join failed");
+#endif
__t_ = 0;
}
@@ -39,8 +41,10 @@
if (ec == 0)
__t_ = 0;
}
+#ifndef _LIBCPP_NO_EXCEPTIONS
if (ec)
throw system_error(error_code(ec, system_category()), "thread::detach failed");
+#endif
}
unsigned