[llvm-cov] - Included footer "Generated by llvm-cov -- llvm version <version number>" in the coverage report.

The llvm-cov version information will be useful to the user when comparing the code coverage across different versions of llvm-cov. This patch provides the llvm-cov version information in the generated coverage report.

Differential Revision: https://reviews.llvm.org/D24457

llvm-svn: 281321
diff --git a/llvm/tools/llvm-cov/SourceCoverageViewText.cpp b/llvm/tools/llvm-cov/SourceCoverageViewText.cpp
index 3d3045e..954572a 100644
--- a/llvm/tools/llvm-cov/SourceCoverageViewText.cpp
+++ b/llvm/tools/llvm-cov/SourceCoverageViewText.cpp
@@ -40,6 +40,9 @@
   CoverageReport Report(Opts, Coverage);
   Report.renderFileReports(OSRef);
 
+  Opts.colored_ostream(OSRef, raw_ostream::CYAN) << "\n"
+                                                 << Opts.getLLVMVersionString();
+
   return Error::success();
 }
 
@@ -64,7 +67,10 @@
 
 void SourceCoverageViewText::renderViewHeader(raw_ostream &) {}
 
-void SourceCoverageViewText::renderViewFooter(raw_ostream &) {}
+void SourceCoverageViewText::renderViewFooter(raw_ostream &OS) {
+  getOptions().colored_ostream(OS, raw_ostream::CYAN)
+      << "\n" << getOptions().getLLVMVersionString();
+}
 
 void SourceCoverageViewText::renderSourceName(raw_ostream &OS, bool WholeFile) {
   std::string ViewInfo = WholeFile ? getVerboseSourceName() : getSourceName();