[PATCH] D41033: Use ErrorOS for log messages as well as error

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 8 14:16:08 PST 2017


sbc100 updated this revision to Diff 126209.
sbc100 added a comment.

- cleanup


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D41033

Files:
  Common/ErrorHandler.cpp


Index: Common/ErrorHandler.cpp
===================================================================
--- Common/ErrorHandler.cpp
+++ Common/ErrorHandler.cpp
@@ -73,15 +73,13 @@
 void ErrorHandler::log(const Twine &Msg) {
   if (Verbose) {
     std::lock_guard<std::mutex> Lock(Mu);
-    outs() << LogName << ": " << Msg << "\n";
-    outs().flush();
+    *ErrorOS << LogName << ": " << Msg << "\n";
   }
 }
 
 void ErrorHandler::message(const Twine &Msg) {
   std::lock_guard<std::mutex> Lock(Mu);
-  outs() << Msg << "\n";
-  outs().flush();
+  *ErrorOS << Msg << "\n";
 }
 
 void ErrorHandler::warn(const Twine &Msg) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41033.126209.patch
Type: text/x-patch
Size: 619 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171208/b4b7fcba/attachment.bin>


More information about the llvm-commits mailing list