From 2f5a3dce0fbcab050060f6f0d262a1405945cde2 Mon Sep 17 00:00:00 2001 From: Vedant Kumar Date: Thu, 15 Sep 2016 04:41:39 +0000 Subject: [PATCH] [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. llvm-svn: 281579 --- llvm/test/tools/llvm-cov/Inputs/showProjectSummary.test | 4 ++-- llvm/tools/llvm-cov/SourceCoverageView.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/test/tools/llvm-cov/Inputs/showProjectSummary.test b/llvm/test/tools/llvm-cov/Inputs/showProjectSummary.test index ca9d6ca..80ece5b 100644 --- a/llvm/test/tools/llvm-cov/Inputs/showProjectSummary.test +++ b/llvm/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 diff --git a/llvm/tools/llvm-cov/SourceCoverageView.cpp b/llvm/tools/llvm-cov/SourceCoverageView.cpp index 362f48b..ad6aa66 100644 --- a/llvm/tools/llvm-cov/SourceCoverageView.cpp +++ b/llvm/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); -- 2.7.4