From: Simon Pilgrim Date: Wed, 6 Oct 2021 11:13:40 +0000 (+0100) Subject: [llvm] Unix.h - Replace report_fatal_error(std::string) with report_fatal_error(Twine) X-Git-Tag: upstream/15.0.7~29488 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e9f4fa75ed19a075593928644de92b398345772a;p=platform%2Fupstream%2Fllvm.git [llvm] Unix.h - Replace report_fatal_error(std::string) with report_fatal_error(Twine) As described on D111049, we're trying to remove the dependency from error handling and replace uses of report_fatal_error(const std::string&) with the Twine() variant which can be forward declared. --- diff --git a/llvm/lib/Support/Unix/Unix.h b/llvm/lib/Support/Unix/Unix.h index e392434..1599241 100644 --- a/llvm/lib/Support/Unix/Unix.h +++ b/llvm/lib/Support/Unix/Unix.h @@ -70,7 +70,7 @@ static inline bool MakeErrMsg( [[noreturn]] static inline void ReportErrnumFatal(const char *Msg, int errnum) { std::string ErrMsg; MakeErrMsg(&ErrMsg, Msg, errnum); - llvm::report_fatal_error(ErrMsg); + llvm::report_fatal_error(llvm::Twine(ErrMsg)); } namespace llvm {