[lld] r301693 - Flush output in log()
Hans Wennborg via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 28 14:35:03 PDT 2017
Author: hans
Date: Fri Apr 28 16:35:02 2017
New Revision: 301693
URL: http://llvm.org/viewvc/llvm-project?rev=301693&view=rev
Log:
Flush output in log()
This change was motivated by output from lld-link.exe and link.exe
getting intermixed. There's already a flush() call in message(), so
there's precedence.
Modified:
lld/trunk/COFF/Error.cpp
lld/trunk/ELF/Error.cpp
Modified: lld/trunk/COFF/Error.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Error.cpp?rev=301693&r1=301692&r2=301693&view=diff
==============================================================================
--- lld/trunk/COFF/Error.cpp (original)
+++ lld/trunk/COFF/Error.cpp Fri Apr 28 16:35:02 2017
@@ -59,6 +59,7 @@ void log(const Twine &Msg) {
if (Config->Verbose) {
std::lock_guard<std::mutex> Lock(Mu);
outs() << Argv0 << ": " << Msg << "\n";
+ outs().flush();
}
}
Modified: lld/trunk/ELF/Error.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Error.cpp?rev=301693&r1=301692&r2=301693&view=diff
==============================================================================
--- lld/trunk/ELF/Error.cpp (original)
+++ lld/trunk/ELF/Error.cpp Fri Apr 28 16:35:02 2017
@@ -60,6 +60,7 @@ void elf::log(const Twine &Msg) {
if (Config->Verbose) {
std::lock_guard<std::mutex> Lock(Mu);
outs() << Argv0 << ": " << Msg << "\n";
+ outs().flush();
}
}
More information about the llvm-commits
mailing list