[lld] r247853 - COFF: Output messages for /verbose to stdout instead of stderr.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 16 14:30:41 PDT 2015


Author: ruiu
Date: Wed Sep 16 16:30:40 2015
New Revision: 247853

URL: http://llvm.org/viewvc/llvm-project?rev=247853&view=rev
Log:
COFF: Output messages for /verbose to stdout instead of stderr.

This patch also makes the message less verbose.

Modified:
    lld/trunk/COFF/Chunks.cpp

Modified: lld/trunk/COFF/Chunks.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Chunks.cpp?rev=247853&r1=247852&r2=247853&view=diff
==============================================================================
--- lld/trunk/COFF/Chunks.cpp (original)
+++ lld/trunk/COFF/Chunks.cpp Wed Sep 16 16:30:40 2015
@@ -207,13 +207,10 @@ bool SectionChunk::isCOMDAT() const {
 }
 
 void SectionChunk::printDiscardedMessage() const {
-  if (this == Ptr) {
-    // Removed by dead-stripping.
-    llvm::dbgs() << "Discarded " << Sym->getName() << "\n";
-  } else {
-    // Removed by ICF.
-    llvm::dbgs() << "Replaced " << Sym->getName() << "\n";
-  }
+  // Removed by dead-stripping. If it's removed by ICF, ICF already
+  // printed out the name, so don't repeat that here.
+  if (Sym && this == Ptr)
+    llvm::outs() << "Discarded " << Sym->getName() << "\n";
 }
 
 StringRef SectionChunk::getDebugName() {




More information about the llvm-commits mailing list