[llvm-cov] Just emit the version number in the index file
authorVedant Kumar <vsk@apple.com>
Tue, 13 Sep 2016 23:00:13 +0000 (23:00 +0000)
committerVedant Kumar <vsk@apple.com>
Tue, 13 Sep 2016 23:00:13 +0000 (23:00 +0000)
Having the version information in every view is distracting, especially
if there are several sub-views.

llvm-svn: 281414

llvm/test/tools/llvm-cov/showProjectSummary.cpp
llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp
llvm/tools/llvm-cov/SourceCoverageViewText.cpp

index 604e701..dfe59bf 100644 (file)
@@ -12,9 +12,9 @@ int main(int argc, char ** argv) {
 }
 
 // Test console output.
-// RUN: llvm-cov show %S/Inputs/showProjectSummary.covmapping -instr-profile %t.profdata -filename-equivalence %s | FileCheck -check-prefixes=TEXT,TEXT-FILE,TEXT-HEADER,TEXT-FOOTER %s
-// RUN: llvm-cov show %S/Inputs/showProjectSummary.covmapping -instr-profile %t.profdata -project-title "Test Suite" -filename-equivalence %s | FileCheck -check-prefixes=TEXT-TITLE,TEXT,TEXT-FILE,TEXT-HEADER,TEXT-FOOTER %s
-// RUN: llvm-cov show %S/Inputs/showProjectSummary.covmapping -instr-profile %t.profdata -project-title "Test Suite" -name=main -filename-equivalence %s | FileCheck -check-prefixes=TEXT-FUNCTION,TEXT-HEADER,TEXT-FOOTER %s
+// RUN: llvm-cov show %S/Inputs/showProjectSummary.covmapping -instr-profile %t.profdata -filename-equivalence %s | FileCheck -check-prefixes=TEXT,TEXT-FILE,TEXT-HEADER %s
+// RUN: llvm-cov show %S/Inputs/showProjectSummary.covmapping -instr-profile %t.profdata -project-title "Test Suite" -filename-equivalence %s | FileCheck -check-prefixes=TEXT-TITLE,TEXT,TEXT-FILE,TEXT-HEADER %s
+// RUN: llvm-cov show %S/Inputs/showProjectSummary.covmapping -instr-profile %t.profdata -project-title "Test Suite" -name=main -filename-equivalence %s | FileCheck -check-prefixes=TEXT-FUNCTION,TEXT-HEADER %s
 // RUN: llvm-cov show %S/Inputs/showProjectSummary.covmapping -instr-profile=%t.profdata -o %t.dir -filename-equivalence %s
 // RUN: FileCheck -check-prefixes=TEXT-FOOTER -input-file=%t.dir/index.txt %s
 // TEXT-TITLE: Test Suite
@@ -27,12 +27,12 @@ int main(int argc, char ** argv) {
 
 // Test html output.
 // RUN: llvm-cov show %S/Inputs/showProjectSummary.covmapping -format=html -o %t.dir -instr-profile %t.profdata -filename-equivalence %s
-// RUN: FileCheck -check-prefixes=HTML,HTML-FILE,HTML-HEADER,HTML-FOOTER -input-file %t.dir/coverage/tmp/showProjectSummary.cpp.html %s
+// RUN: FileCheck -check-prefixes=HTML,HTML-FILE,HTML-HEADER -input-file %t.dir/coverage/tmp/showProjectSummary.cpp.html %s
 // RUN: llvm-cov show %S/Inputs/showProjectSummary.covmapping -format=html -o %t.dir -instr-profile %t.profdata -project-title "Test Suite" -filename-equivalence %s
-// RUN: FileCheck -check-prefixes=HTML-TITLE,HTML,HTML-FILE,HTML-HEADER,HTML-FOOTER -input-file %t.dir/coverage/tmp/showProjectSummary.cpp.html %s
+// RUN: FileCheck -check-prefixes=HTML-TITLE,HTML,HTML-FILE,HTML-HEADER -input-file %t.dir/coverage/tmp/showProjectSummary.cpp.html %s
 // RUN: FileCheck -check-prefixes=HTML-TITLE,HTML,HTML-FOOTER -input-file %t.dir/index.html %s
 // RUN: llvm-cov show %S/Inputs/showProjectSummary.covmapping -format=html -o %t.dir -instr-profile %t.profdata  -project-title "Test Suite" -filename-equivalence -name=main %s
-// RUN: FileCheck -check-prefixes=HTML-FUNCTION,HTML-HEADER,HTML-FOOTER -input-file %t.dir/functions.html %s
+// RUN: FileCheck -check-prefixes=HTML-FUNCTION,HTML-HEADER -input-file %t.dir/functions.html %s
 // HTML-TITLE: <h1>Test Suite</h1>
 // HTML: <h2>Coverage Report</h2>
 // HTML: <h4>Created:{{.*}}</h4>
index 31c39c7..375b0de 100644 (file)
@@ -393,8 +393,7 @@ void SourceCoverageViewHTML::renderViewHeader(raw_ostream &OS) {
 }
 
 void SourceCoverageViewHTML::renderViewFooter(raw_ostream &OS) {
-  OS << EndTable << EndCenteredDiv
-     << tag("h5", escape(getOptions().getLLVMVersionString(), getOptions()));
+  OS << EndTable << EndCenteredDiv;
 }
 
 void SourceCoverageViewHTML::renderSourceName(raw_ostream &OS, bool WholeFile) {
index 954572a..16bbe56 100644 (file)
@@ -67,10 +67,7 @@ unsigned getDividerWidth(const CoverageViewOptions &Opts) {
 
 void SourceCoverageViewText::renderViewHeader(raw_ostream &) {}
 
-void SourceCoverageViewText::renderViewFooter(raw_ostream &OS) {
-  getOptions().colored_ostream(OS, raw_ostream::CYAN)
-      << "\n" << getOptions().getLLVMVersionString();
-}
+void SourceCoverageViewText::renderViewFooter(raw_ostream &) {}
 
 void SourceCoverageViewText::renderSourceName(raw_ostream &OS, bool WholeFile) {
   std::string ViewInfo = WholeFile ? getVerboseSourceName() : getSourceName();