From a9c3c176ad741b9c2b915abc59dd977d0299c53f Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Wed, 23 Oct 2019 15:34:48 +0200 Subject: Reland "[Support] Add a way to run a function on a detached thread"" This reverts commit 7bc7fe6b789d25d48d6dc71d533a411e9e981237. The immediate callers have been fixed to pass nullopt where appropriate. --- llvm/lib/Support/Unix/Unix.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'llvm/lib/Support/Unix/Unix.h') diff --git a/llvm/lib/Support/Unix/Unix.h b/llvm/lib/Support/Unix/Unix.h index 86309b0567f..1fc9a414f74 100644 --- a/llvm/lib/Support/Unix/Unix.h +++ b/llvm/lib/Support/Unix/Unix.h @@ -21,6 +21,7 @@ #include "llvm/Config/config.h" #include "llvm/Support/Chrono.h" #include "llvm/Support/Errno.h" +#include "llvm/Support/ErrorHandling.h" #include #include #include @@ -69,6 +70,14 @@ static inline bool MakeErrMsg( return true; } +// Include StrError(errnum) in a fatal error message. +LLVM_ATTRIBUTE_NORETURN static inline void ReportErrnumFatal(const char *Msg, + int errnum) { + std::string ErrMsg; + MakeErrMsg(&ErrMsg, Msg, errnum); + llvm::report_fatal_error(ErrMsg); +} + namespace llvm { namespace sys { -- cgit v1.2.3