Sfoglia il codice sorgente

[llvm-cov] Don't print a verbose title when looking at one file

Having the same title, timestamp, etc. occur repeatedly creates an
unnecessary distraction when paging through a report.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281579 91177308-0d34-0410-b5e6-96231b3b80d8
Vedant Kumar 9 anni fa
parent
commit
90562cd08a

+ 2 - 2
test/tools/llvm-cov/Inputs/showProjectSummary.test

@@ -1,6 +1,6 @@
 TEXT-TITLE: Test Suite
-TEXT: Coverage Report
-TEXT: Created:
+TEXT-NOT: Coverage Report
+TEXT-NOT: Created:
 TEXT-FILE-NOT: (Binary: showProjectSummary.covmapping)
 TEXT-FUNCTION: main:
 TEXT-FOOTER: Generated by llvm-cov

+ 1 - 1
tools/llvm-cov/SourceCoverageView.cpp

@@ -168,7 +168,7 @@ void SourceCoverageView::addInstantiation(
 
 void SourceCoverageView::print(raw_ostream &OS, bool WholeFile,
                                bool ShowSourceName, unsigned ViewDepth) {
-  if (WholeFile)
+  if (WholeFile && getOptions().hasOutputDirectory())
     renderCellInTitle(OS, "Coverage Report");
 
   renderViewHeader(OS);