projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2166160
)
[llvm] Unix.h - Replace report_fatal_error(std::string) with report_fatal_error(Twine)
author
Simon Pilgrim
<llvm-dev@redking.me.uk>
Wed, 6 Oct 2021 11:13:40 +0000
(12:13 +0100)
committer
Simon Pilgrim
<llvm-dev@redking.me.uk>
Wed, 6 Oct 2021 11:13:40 +0000
(12:13 +0100)
As described on D111049, we're trying to remove the <string> dependency from error handling and replace uses of report_fatal_error(const std::string&) with the Twine() variant which can be forward declared.
llvm/lib/Support/Unix/Unix.h
patch
|
blob
|
history
diff --git
a/llvm/lib/Support/Unix/Unix.h
b/llvm/lib/Support/Unix/Unix.h
index
e392434
..
1599241
100644
(file)
--- 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 {