summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Error.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/Error.cpp')
-rw-r--r--lld/ELF/Error.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/lld/ELF/Error.cpp b/lld/ELF/Error.cpp
index 5fbb59dcd2f..700ef700dbd 100644
--- a/lld/ELF/Error.cpp
+++ b/lld/ELF/Error.cpp
@@ -45,9 +45,16 @@ static void print(StringRef S, raw_ostream::Colors C) {
}
void elf::log(const Twine &Msg) {
- std::lock_guard<std::mutex> Lock(Mu);
- if (Config->Verbose)
+ if (Config->Verbose) {
+ std::lock_guard<std::mutex> Lock(Mu);
outs() << Argv0 << ": " << Msg << "\n";
+ }
+}
+
+void elf::message(const Twine &Msg) {
+ std::lock_guard<std::mutex> Lock(Mu);
+ outs() << Msg << "\n";
+ outs().flush();
}
void elf::warn(const Twine &Msg) {
OpenPOWER on IntegriCloud