Move the printing of llvm-cov information out from collectLineCounts().
authorBob Wilson <bob.wilson@apple.com>
Tue, 22 Oct 2013 00:09:03 +0000 (00:09 +0000)
committerBob Wilson <bob.wilson@apple.com>
Tue, 22 Oct 2013 00:09:03 +0000 (00:09 +0000)
collectLineCounts() should only organize the output data. This is done in
anticipation of subsequent changes which will pass in GCNO and GCDA filenames
into the print function where it is printed similar to the gcov output.

Patch by Yuchen Wu!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193134 91177308-0d34-0410-b5e6-96231b3b80d8

lib/IR/GCOV.cpp
tools/llvm-cov/llvm-cov.cpp

index e9baa5c8cbc1e93ee047c1d0747c509552cc5755..b8907d01b43deb7961ae979122f15cbb37d0cfcf 100644 (file)
@@ -74,7 +74,6 @@ void GCOVFile::collectLineCounts(FileInfo &FI) {
   for (SmallVectorImpl<GCOVFunction *>::iterator I = Functions.begin(),
          E = Functions.end(); I != E; ++I) 
     (*I)->collectLineCounts(FI);
-  FI.print();
 }
 
 //===----------------------------------------------------------------------===//
index 7b21c5bae2017fc12d5edbbb32bd380bf2e67140..7404679145640873d0f8adac1c600c8c39e21986 100644 (file)
@@ -74,5 +74,6 @@ int main(int argc, char **argv) {
 
   FileInfo FI;
   GF.collectLineCounts(FI);
+  FI.print();
   return 0;
 }