From 112351dc38027f16b6cd5b55bfc41c585324ce01 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Fri, 15 Jul 2016 02:51:05 +0000 Subject: [PATCH] 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 --- lld/ELF/Error.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lld/ELF/Error.cpp b/lld/ELF/Error.cpp index 64570cf..59a49c17b 100644 --- a/lld/ELF/Error.cpp +++ b/lld/ELF/Error.cpp @@ -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); } -- 2.7.4