forked from OSchip/llvm-project
Avoid writing to errs().
We should write to ErrorOS instead. Normaly, *ErrorOS == errs(), but they can be different if LLD is embedded. llvm-svn: 275525
This commit is contained in:
parent
a9d9eda0ce
commit
112351dc38
|
@ -31,7 +31,7 @@ void warning(const Twine &Msg) {
|
|||
if (Config->FatalWarnings)
|
||||
error(Msg);
|
||||
else
|
||||
errs() << Msg << "\n";
|
||||
*ErrorOS << Msg << "\n";
|
||||
}
|
||||
|
||||
void error(const Twine &Msg) {
|
||||
|
@ -44,7 +44,7 @@ void error(std::error_code EC, const Twine &Prefix) {
|
|||
}
|
||||
|
||||
void fatal(const Twine &Msg) {
|
||||
errs() << Msg << "\n";
|
||||
*ErrorOS << Msg << "\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue