[llvm] r193390 - llvm-cov dump to dbgs() instead of outs().

Yuchen Wu yuchenericwu at hotmail.com
Thu Oct 24 19:22:24 PDT 2013


Author: ywu
Date: Thu Oct 24 21:22:24 2013
New Revision: 193390

URL: http://llvm.org/viewvc/llvm-project?rev=193390&view=rev
Log:
llvm-cov dump to dbgs() instead of outs().

Modified:
    llvm/trunk/lib/IR/GCOV.cpp

Modified: llvm/trunk/lib/IR/GCOV.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/GCOV.cpp?rev=193390&r1=193389&r2=193390&view=diff
==============================================================================
--- llvm/trunk/lib/IR/GCOV.cpp (original)
+++ llvm/trunk/lib/IR/GCOV.cpp Thu Oct 24 21:22:24 2013
@@ -12,6 +12,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "llvm/Support/Debug.h"
 #include "llvm/Support/GCOV.h"
 #include "llvm/ADT/OwningPtr.h"
 #include "llvm/ADT/STLExtras.h"
@@ -65,7 +66,7 @@ bool GCOVFile::read(GCOVBuffer &Buffer)
   return true;
 }
 
-/// dump - Dump GCOVFile content on standard out for debugging purposes.
+/// dump - Dump GCOVFile content to dbgs() for debugging purposes.
 void GCOVFile::dump() {
   for (SmallVectorImpl<GCOVFunction *>::iterator I = Functions.begin(),
          E = Functions.end(); I != E; ++I)
@@ -165,9 +166,9 @@ bool GCOVFunction::read(GCOVBuffer &Buff
   return true;
 }
 
-/// dump - Dump GCOVFunction content on standard out for debugging purposes.
+/// dump - Dump GCOVFunction content to dbgs() for debugging purposes.
 void GCOVFunction::dump() {
-  outs() <<  "===== " << Name << " @ " << Filename << ":" << LineNumber << "\n";
+  dbgs() <<  "===== " << Name << " @ " << Filename << ":" << LineNumber << "\n";
   for (SmallVectorImpl<GCOVBlock *>::iterator I = Blocks.begin(),
          E = Blocks.end(); I != E; ++I)
     (*I)->dump();
@@ -205,23 +206,23 @@ void GCOVBlock::collectLineCounts(FileIn
     I->second->collectLineCounts(FI, I->first(), Counter);
 }
 
-/// dump - Dump GCOVBlock content on standard out for debugging purposes.
+/// dump - Dump GCOVBlock content to dbgs() for debugging purposes.
 void GCOVBlock::dump() {
-  outs() << "Block : " << Number << " Counter : " << Counter << "\n";
+  dbgs() << "Block : " << Number << " Counter : " << Counter << "\n";
   if (!Edges.empty()) {
-    outs() << "\tEdges : ";
+    dbgs() << "\tEdges : ";
     for (SmallVectorImpl<uint32_t>::iterator I = Edges.begin(), E = Edges.end();
          I != E; ++I)
-      outs() << (*I) << ",";
-    outs() << "\n";
+      dbgs() << (*I) << ",";
+    dbgs() << "\n";
   }
   if (!Lines.empty()) {
-    outs() << "\tLines : ";
+    dbgs() << "\tLines : ";
     for (StringMap<GCOVLines *>::iterator LI = Lines.begin(),
            LE = Lines.end(); LI != LE; ++LI) {
-      outs() << LI->first() << " -> ";
+      dbgs() << LI->first() << " -> ";
       LI->second->dump();
-      outs() << "\n";
+      dbgs() << "\n";
     }
   }
 }
@@ -238,11 +239,11 @@ void GCOVLines::collectLineCounts(FileIn
     FI.addLineCount(Filename, *I, Count);
 }
 
-/// dump - Dump GCOVLines content on standard out for debugging purposes.
+/// dump - Dump GCOVLines content to dbgs() for debugging purposes.
 void GCOVLines::dump() {
   for (SmallVectorImpl<uint32_t>::iterator I = Lines.begin(),
          E = Lines.end(); I != E; ++I)
-    outs() << (*I) << ",";
+    dbgs() << (*I) << ",";
 }
 
 //===----------------------------------------------------------------------===//





More information about the llvm-commits mailing list