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:
Rui Ueyama 2016-07-15 02:51:05 +00:00
parent a9d9eda0ce
commit 112351dc38
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}