From 1439fa6236abae2a9b523e54b19d0175175beb2a Mon Sep 17 00:00:00 2001 From: Sean Eveson Date: Wed, 27 Sep 2017 16:20:07 +0000 Subject: [PATCH] Revert "[llvm-cov] Create directory structure when filtering using -name*= options" Test failures. llvm-svn: 314314 --- .../llvm-cov/Inputs/dir-with-filtering.covmapping | Bin 264 -> 0 bytes .../llvm-cov/Inputs/dir-with-filtering.proftext | 32 --------- .../tools/llvm-cov/Inputs/dir-with-filtering1.cpp | 8 --- .../tools/llvm-cov/Inputs/dir-with-filtering2.cpp | 8 --- llvm/test/tools/llvm-cov/dir-with-filtering.test | 69 ------------------ .../tools/llvm-cov/showLineExecutionCounts.cpp | 8 +-- .../tools/llvm-cov/showTemplateInstantiations.cpp | 4 +- llvm/test/tools/llvm-cov/style.test | 7 +- llvm/tools/llvm-cov/CodeCoverage.cpp | 77 +++++++++------------ llvm/tools/llvm-cov/CoverageReport.cpp | 15 ++-- llvm/tools/llvm-cov/CoverageReport.h | 10 +-- llvm/tools/llvm-cov/SourceCoverageView.cpp | 5 +- llvm/tools/llvm-cov/SourceCoverageView.h | 6 +- llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp | 10 +-- llvm/tools/llvm-cov/SourceCoverageViewHTML.h | 3 +- llvm/tools/llvm-cov/SourceCoverageViewText.cpp | 8 +-- llvm/tools/llvm-cov/SourceCoverageViewText.h | 3 +- 17 files changed, 61 insertions(+), 212 deletions(-) delete mode 100644 llvm/test/tools/llvm-cov/Inputs/dir-with-filtering.covmapping delete mode 100644 llvm/test/tools/llvm-cov/Inputs/dir-with-filtering.proftext delete mode 100644 llvm/test/tools/llvm-cov/Inputs/dir-with-filtering1.cpp delete mode 100644 llvm/test/tools/llvm-cov/Inputs/dir-with-filtering2.cpp delete mode 100644 llvm/test/tools/llvm-cov/dir-with-filtering.test diff --git a/llvm/test/tools/llvm-cov/Inputs/dir-with-filtering.covmapping b/llvm/test/tools/llvm-cov/Inputs/dir-with-filtering.covmapping deleted file mode 100644 index 0f52ba896ec317653ecefef5f1f8c6823a914d45..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 264 zcmd1FDa%dHFUu`SEiOq(EJ>7k@wAbdn;|~RD9x~pF*h+Yj~C1_Dq{qR8J96Y027ds z17aZ{2C=QDtXX)hACoverage Report -HTML-INDEX: dir-with-filtering1.cpp{{.*}}100.00% (1/1){{.*}}100.00% (4/4){{.*}}100.00% (1/1) -HTML-INDEX: dir-with-filtering2.cpp{{.*}}0.00% (0/1){{.*}}0.00% (0/3){{.*}}0.00% (0/1) - -RUN: FileCheck -input-file=%t.html/coverage/tmp/dir-with-filtering1.cpp.html %s -check-prefix=HTML-FILE1 -HTML-FILE1-NOT:
f1
-HTML-FILE1:
main
-HTML-FILE1-NOT:
f1
-HTML-FILE1: int main() -HTML-FILE1-NOT:
f1
- -RUN: FileCheck -input-file=%t.html/coverage/tmp/dir-with-filtering2.cpp.html %s -check-prefix=HTML-FILE2 -HTML-FILE2-NOT:
f3
-HTML-FILE2:
_Z2f2v
-HTML-FILE2-NOT:
f3
-HTML-FILE2: int f2() -HTML-FILE2-NOT:
f3
- -// Test HTML one file - -RUN: llvm-profdata merge %S/Inputs/dir-with-filtering.proftext -o %t.profdata -RUN: llvm-cov show %S/Inputs/dir-with-filtering.covmapping -format html -o %t.html_one_file -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs -name=main -name=f2 %S/Inputs/dir-with-filtering1.cpp - -RUN: FileCheck -input-file=%t.html_one_file/index.html %s -check-prefix=HTML-INDEX-ONE-FILE -HTML-INDEX-ONE-FILE:

Coverage Report

-HTML-INDEX-ONE-FILE: dir-with-filtering1.cpp{{.*}}100.00% (1/1){{.*}}100.00% (4/4){{.*}}100.00% (1/1) -HTML-INDEX-ONE-FILE-NOT: dir-with-filtering2.cpp - -RUN: FileCheck -input-file=%t.html_one_file/coverage/tmp/dir-with-filtering1.cpp.html %s -check-prefix=HTML-FILE1 diff --git a/llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp b/llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp index c4b7682..ba974dc 100644 --- a/llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp +++ b/llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp @@ -31,9 +31,9 @@ int main() { // TEXT: [[@LINE]]| 161|int main( // Test -output-dir. // RUN: llvm-cov show %S/Inputs/lineExecutionCounts.covmapping -o %t.dir -instr-profile %t.profdata -path-equivalence=/tmp,%S %s -// RUN: llvm-cov show %S/Inputs/lineExecutionCounts.covmapping -output-dir %t.filtered.dir -instr-profile %t.profdata -path-equivalence=/tmp,%S -name=main %s +// RUN: llvm-cov show %S/Inputs/lineExecutionCounts.covmapping -output-dir %t.dir -instr-profile %t.profdata -path-equivalence=/tmp,%S -name=main %s // RUN: FileCheck -check-prefixes=TEXT,WHOLE-FILE -input-file %t.dir/coverage/tmp/showLineExecutionCounts.cpp.txt %s -// RUN: FileCheck -check-prefixes=TEXT,FILTER -input-file %t.filtered.dir/coverage/tmp/showLineExecutionCounts.cpp.txt %s +// RUN: FileCheck -check-prefixes=TEXT,FILTER -input-file %t.dir/functions.txt %s // // RUN: llvm-cov export %S/Inputs/lineExecutionCounts.covmapping -instr-profile %t.profdata -name=main 2>/dev/null > %t.export.json // RUN: FileCheck -input-file %t.export.json %S/Inputs/lineExecutionCounts.json @@ -41,9 +41,9 @@ int main() { // TEXT: [[@LINE]]| 161|int main( // // Test html output. // RUN: llvm-cov show %S/Inputs/lineExecutionCounts.covmapping -format html -o %t.html.dir -instr-profile %t.profdata -path-equivalence=/tmp,%S %s -// RUN: llvm-cov show %S/Inputs/lineExecutionCounts.covmapping -format html -o %t.html.filtered.dir -instr-profile %t.profdata -path-equivalence=/tmp,%S -name=main %s +// RUN: llvm-cov show %S/Inputs/lineExecutionCounts.covmapping -format html -o %t.html.dir -instr-profile %t.profdata -path-equivalence=/tmp,%S -name=main %s // RUN: FileCheck -check-prefixes=HTML,HTML-WHOLE-FILE -input-file %t.html.dir/coverage/tmp/showLineExecutionCounts.cpp.html %s -// RUN: FileCheck -check-prefixes=HTML,HTML-FILTER -input-file %t.html.filtered.dir/coverage/tmp/showLineExecutionCounts.cpp.html %s +// RUN: FileCheck -check-prefixes=HTML,HTML-FILTER -input-file %t.html.dir/functions.html %s // // HTML-WHOLE-FILE:
[[@LINE-44]]
// before
 // HTML-FILTER-NOT: 
[[@LINE-45]]
// before
diff --git a/llvm/test/tools/llvm-cov/showTemplateInstantiations.cpp b/llvm/test/tools/llvm-cov/showTemplateInstantiations.cpp
index 428ceac..3053b06 100644
--- a/llvm/test/tools/llvm-cov/showTemplateInstantiations.cpp
+++ b/llvm/test/tools/llvm-cov/showTemplateInstantiations.cpp
@@ -41,9 +41,9 @@ int main() {         // ALL:         [[@LINE]]| 1|int main() {
 
 // Test html output.
 // RUN: llvm-cov show %S/Inputs/templateInstantiations.covmapping -instr-profile %S/Inputs/templateInstantiations.profdata -path-equivalence=/tmp,%S %s -format html -o %t.html.dir
-// RUN: llvm-cov show %S/Inputs/templateInstantiations.covmapping -instr-profile %S/Inputs/templateInstantiations.profdata -path-equivalence=/tmp,%S -name=_Z4funcIbEiT_ %s -format html -o %t.html.filtered.dir
+// RUN: llvm-cov show %S/Inputs/templateInstantiations.covmapping -instr-profile %S/Inputs/templateInstantiations.profdata -path-equivalence=/tmp,%S -name=_Z4funcIbEiT_ %s -format html -o %t.html.dir
 // RUN: FileCheck -check-prefixes=HTML-SHARED,HTML-ALL -input-file=%t.html.dir/coverage/tmp/showTemplateInstantiations.cpp.html %s
-// RUN: FileCheck -check-prefixes=HTML-SHARED,HTML-FILTER -input-file=%t.html.filtered.dir/coverage/tmp/showTemplateInstantiations.cpp.html %s
+// RUN: FileCheck -check-prefixes=HTML-SHARED,HTML-FILTER -input-file=%t.html.dir/functions.html %s
 
 // HTML-ALL: 
[[@LINE-44]]
// before
 // HTML-FILTER-NOT: 
[[@LINE-45]]
// before
diff --git a/llvm/test/tools/llvm-cov/style.test b/llvm/test/tools/llvm-cov/style.test
index 202bc9d..579189b 100644
--- a/llvm/test/tools/llvm-cov/style.test
+++ b/llvm/test/tools/llvm-cov/style.test
@@ -1,17 +1,14 @@
 RUN: llvm-cov show %S/Inputs/templateInstantiations.covmapping -instr-profile %S/Inputs/templateInstantiations.profdata -path-equivalence=/tmp,%S %S/showTemplateInstantiations.cpp -format html -o %t.dir
 
-RUN: llvm-cov show %S/Inputs/templateInstantiations.covmapping -instr-profile %S/Inputs/templateInstantiations.profdata -path-equivalence=/tmp,%S -name=_Z4funcIbEiT_ %S/showTemplateInstantiations.cpp -format html -o %t.filtered.dir
+RUN: llvm-cov show %S/Inputs/templateInstantiations.covmapping -instr-profile %S/Inputs/templateInstantiations.profdata -path-equivalence=/tmp,%S -name=_Z4funcIbEiT_ %S/showTemplateInstantiations.cpp -format html -o %t.dir
 
 RUN: llvm-cov show %S/Inputs/templateInstantiations.covmapping -instr-profile %S/Inputs/templateInstantiations.profdata -path-equivalence=/tmp,%S %S/showTemplateInstantiations.cpp -format html | FileCheck %s -check-prefix=NODIR
 
 RUN: FileCheck %s -input-file=%t.dir/style.css -check-prefix=STYLE
+RUN: FileCheck %s -input-file=%t.dir/functions.html -check-prefix=TOPLEVEL
 RUN: FileCheck %s -input-file=%t.dir/index.html -check-prefix=TOPLEVEL
 RUN: FileCheck %s -input-file=%t.dir/coverage/tmp/showTemplateInstantiations.cpp.html -check-prefix=FILEVIEW
 
-RUN: FileCheck %s -input-file=%t.filtered.dir/style.css -check-prefix=STYLE
-RUN: FileCheck %s -input-file=%t.filtered.dir/index.html -check-prefix=TOPLEVEL
-RUN: FileCheck %s -input-file=%t.filtered.dir/coverage/tmp/showTemplateInstantiations.cpp.html -check-prefix=FILEVIEW
-
 STYLE-DAG: .red
 STYLE-DAG: .cyan
 STYLE-DAG: .source-name-title
diff --git a/llvm/tools/llvm-cov/CodeCoverage.cpp b/llvm/tools/llvm-cov/CodeCoverage.cpp
index 811ac53..1ea54a8 100644
--- a/llvm/tools/llvm-cov/CodeCoverage.cpp
+++ b/llvm/tools/llvm-cov/CodeCoverage.cpp
@@ -35,9 +35,7 @@
 #include "llvm/Support/Threading.h"
 #include "llvm/Support/ThreadPool.h"
 #include "llvm/Support/ToolOutputFile.h"
-
 #include 
-#include 
 #include 
 
 using namespace llvm;
@@ -528,8 +526,7 @@ void CodeCoverageTool::writeSourceFileView(StringRef SourceFile,
   auto OS = std::move(OSOrErr.get());
 
   View->print(*OS.get(), /*Wholefile=*/true,
-              /*ShowSourceName=*/ShowFilenames,
-              /*ShowTitle=*/ViewOpts.hasOutputDirectory());
+              /*ShowSourceName=*/ShowFilenames);
   Printer->closeViewFile(std::move(OS));
 }
 
@@ -848,54 +845,29 @@ int CodeCoverageTool::show(int argc, const char **argv,
 
   auto Printer = CoveragePrinter::create(ViewOpts);
 
-  if (SourceFiles.empty())
-    // Get the source files from the function coverage mapping.
-    for (StringRef Filename : Coverage->getUniqueSourceFiles())
-      SourceFiles.push_back(Filename);
-
-  // Create an index out of the source files.
-  if (ViewOpts.hasOutputDirectory()) {
-    if (Error E = Printer->createIndexFile(SourceFiles, *Coverage, Filters)) {
-      error("Could not create index file!", toString(std::move(E)));
+  if (!Filters.empty()) {
+    auto OSOrErr = Printer->createViewFile("functions", /*InToplevel=*/true);
+    if (Error E = OSOrErr.takeError()) {
+      error("Could not create view file!", toString(std::move(E)));
       return 1;
     }
-  }
+    auto OS = std::move(OSOrErr.get());
 
-  if (!Filters.empty()) {
-    // Build the map of filenames to functions.
-    std::map>
-        FilenameFunctionMap;
-    for (const auto &SourceFile : SourceFiles)
-      for (const auto &Function : Coverage->getCoveredFunctions(SourceFile))
-        if (Filters.matches(*Coverage.get(), Function))
-          FilenameFunctionMap[SourceFile].push_back(&Function);
-
-    // Only print filter matching functions for each file.
-    for (const auto &FileFunc : FilenameFunctionMap) {
-      const StringRef &File = FileFunc.first;
-      const auto &Functions = FileFunc.second;
-
-      auto OSOrErr = Printer->createViewFile(File, /*InToplevel=*/false);
-      if (Error E = OSOrErr.takeError()) {
-        error("Could not create view file!", toString(std::move(E)));
-        return 1;
-      }
-      auto OS = std::move(OSOrErr.get());
-
-      bool ShowTitle = true;
-      for (const auto *Function : Functions) {
-        auto FunctionView = createFunctionView(*Function, *Coverage);
-        if (!FunctionView) {
-          warning("Could not read coverage for '" + Function->Name + "'.");
-          continue;
-        }
-        FunctionView->print(*OS.get(), /*WholeFile=*/false,
-                            /*ShowSourceName=*/true, ShowTitle);
-        ShowTitle = false;
+    // Show functions.
+    for (const auto &Function : Coverage->getCoveredFunctions()) {
+      if (!Filters.matches(*Coverage.get(), Function))
+        continue;
+
+      auto mainView = createFunctionView(Function, *Coverage);
+      if (!mainView) {
+        warning("Could not read coverage for '" + Function.Name + "'.");
+        continue;
       }
 
-      Printer->closeViewFile(std::move(OS));
+      mainView->print(*OS.get(), /*WholeFile=*/false, /*ShowSourceName=*/true);
     }
+
+    Printer->closeViewFile(std::move(OS));
     return 0;
   }
 
@@ -904,6 +876,19 @@ int CodeCoverageTool::show(int argc, const char **argv,
       (SourceFiles.size() != 1) || ViewOpts.hasOutputDirectory() ||
       (ViewOpts.Format == CoverageViewOptions::OutputFormat::HTML);
 
+  if (SourceFiles.empty())
+    // Get the source files from the function coverage mapping.
+    for (StringRef Filename : Coverage->getUniqueSourceFiles())
+      SourceFiles.push_back(Filename);
+
+  // Create an index out of the source files.
+  if (ViewOpts.hasOutputDirectory()) {
+    if (Error E = Printer->createIndexFile(SourceFiles, *Coverage)) {
+      error("Could not create index file!", toString(std::move(E)));
+      return 1;
+    }
+  }
+
   // If NumThreads is not specified, auto-detect a good default.
   if (NumThreads == 0)
     NumThreads =
diff --git a/llvm/tools/llvm-cov/CoverageReport.cpp b/llvm/tools/llvm-cov/CoverageReport.cpp
index 5c8ffe1..4c02bbc 100644
--- a/llvm/tools/llvm-cov/CoverageReport.cpp
+++ b/llvm/tools/llvm-cov/CoverageReport.cpp
@@ -322,8 +322,7 @@ void CoverageReport::renderFunctionReports(ArrayRef Files,
 
 std::vector CoverageReport::prepareFileReports(
     const coverage::CoverageMapping &Coverage, FileCoverageSummary &Totals,
-    ArrayRef Files, const CoverageViewOptions &Options,
-    const CoverageFilter &Filters) {
+    ArrayRef Files, const CoverageViewOptions &Options) {
   std::vector FileReports;
   unsigned LCP = getRedundantPrefixLen(Files);
 
@@ -333,15 +332,11 @@ std::vector CoverageReport::prepareFileReports(
     for (const auto &Group : Coverage.getInstantiationGroups(Filename)) {
       std::vector InstantiationSummaries;
       for (const coverage::FunctionRecord *F : Group.getInstantiations()) {
-        if (!Filters.matches(Coverage, *F))
-          continue;
         auto InstantiationSummary = FunctionCoverageSummary::get(Coverage, *F);
         Summary.addInstantiation(InstantiationSummary);
         Totals.addInstantiation(InstantiationSummary);
         InstantiationSummaries.push_back(InstantiationSummary);
       }
-      if (InstantiationSummaries.empty())
-        continue;
 
       auto GroupSummary =
           FunctionCoverageSummary::get(Group, InstantiationSummaries);
@@ -364,15 +359,13 @@ void CoverageReport::renderFileReports(raw_ostream &OS) const {
   std::vector UniqueSourceFiles;
   for (StringRef SF : Coverage.getUniqueSourceFiles())
     UniqueSourceFiles.emplace_back(SF.str());
-  renderFileReports(OS, UniqueSourceFiles, CoverageFiltersMatchAll());
+  renderFileReports(OS, UniqueSourceFiles);
 }
 
 void CoverageReport::renderFileReports(raw_ostream &OS,
-                                       ArrayRef Files,
-                                       const CoverageFilter &Filters) const {
+                                       ArrayRef Files) const {
   FileCoverageSummary Totals("TOTAL");
-  auto FileReports =
-      prepareFileReports(Coverage, Totals, Files, Options, Filters);
+  auto FileReports = prepareFileReports(Coverage, Totals, Files, Options);
 
   std::vector Filenames;
   for (const FileCoverageSummary &FCS : FileReports)
diff --git a/llvm/tools/llvm-cov/CoverageReport.h b/llvm/tools/llvm-cov/CoverageReport.h
index d78f2e4..242dc7f 100644
--- a/llvm/tools/llvm-cov/CoverageReport.h
+++ b/llvm/tools/llvm-cov/CoverageReport.h
@@ -14,7 +14,6 @@
 #ifndef LLVM_COV_COVERAGEREPORT_H
 #define LLVM_COV_COVERAGEREPORT_H
 
-#include "CoverageFilters.h"
 #include "CoverageSummaryInfo.h"
 #include "CoverageViewOptions.h"
 
@@ -41,16 +40,13 @@ public:
   static std::vector
   prepareFileReports(const coverage::CoverageMapping &Coverage,
                      FileCoverageSummary &Totals, ArrayRef Files,
-                     const CoverageViewOptions &Options,
-                     const CoverageFilter &Filters = CoverageFiltersMatchAll());
+                     const CoverageViewOptions &Options);
 
   /// Render file reports for every unique file in the coverage mapping.
   void renderFileReports(raw_ostream &OS) const;
 
-  /// Render file reports for the files specified in \p Files and the functions
-  /// in \p Filters.
-  void renderFileReports(raw_ostream &OS, ArrayRef Files,
-                         const CoverageFilter &Filters) const;
+  /// Render file reports for the files specified in \p Files.
+  void renderFileReports(raw_ostream &OS, ArrayRef Files) const;
 };
 
 } // end namespace llvm
diff --git a/llvm/tools/llvm-cov/SourceCoverageView.cpp b/llvm/tools/llvm-cov/SourceCoverageView.cpp
index f944dc6..dc00b80 100644
--- a/llvm/tools/llvm-cov/SourceCoverageView.cpp
+++ b/llvm/tools/llvm-cov/SourceCoverageView.cpp
@@ -164,9 +164,8 @@ void SourceCoverageView::addInstantiation(
 }
 
 void SourceCoverageView::print(raw_ostream &OS, bool WholeFile,
-                               bool ShowSourceName, bool ShowTitle,
-                               unsigned ViewDepth) {
-  if (ShowTitle)
+                               bool ShowSourceName, unsigned ViewDepth) {
+  if (WholeFile && getOptions().hasOutputDirectory())
     renderTitle(OS, "Coverage Report");
 
   renderViewHeader(OS);
diff --git a/llvm/tools/llvm-cov/SourceCoverageView.h b/llvm/tools/llvm-cov/SourceCoverageView.h
index 7c7e878..72d6866 100644
--- a/llvm/tools/llvm-cov/SourceCoverageView.h
+++ b/llvm/tools/llvm-cov/SourceCoverageView.h
@@ -22,7 +22,6 @@
 
 namespace llvm {
 
-class CoverageFilter;
 class SourceCoverageView;
 
 /// \brief A view that represents a macro or include expansion.
@@ -112,8 +111,7 @@ public:
 
   /// \brief Create an index which lists reports for the given source files.
   virtual Error createIndexFile(ArrayRef SourceFiles,
-                                const coverage::CoverageMapping &Coverage,
-                                const CoverageFilter &Filters) = 0;
+                                const coverage::CoverageMapping &Coverage) = 0;
 
   /// @}
 };
@@ -260,7 +258,7 @@ public:
   /// \brief Print the code coverage information for a specific portion of a
   /// source file to the output stream.
   void print(raw_ostream &OS, bool WholeFile, bool ShowSourceName,
-             bool ShowTitle, unsigned ViewDepth = 0);
+             unsigned ViewDepth = 0);
 };
 
 } // namespace llvm
diff --git a/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp b/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp
index a031f18..300a016 100644
--- a/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp
+++ b/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp
@@ -366,7 +366,7 @@ void CoveragePrinterHTML::emitFileSummary(raw_ostream &OS, StringRef SF,
 
 Error CoveragePrinterHTML::createIndexFile(
     ArrayRef SourceFiles,
-    const coverage::CoverageMapping &Coverage, const CoverageFilter &Filters) {
+    const coverage::CoverageMapping &Coverage) {
   // Emit the default stylesheet.
   auto CSSOrErr = createOutputStream("style", "css", /*InToplevel=*/true);
   if (Error E = CSSOrErr.takeError())
@@ -404,8 +404,8 @@ Error CoveragePrinterHTML::createIndexFile(
   OSRef << BeginCenteredDiv << BeginTable;
   emitColumnLabelsForIndex(OSRef, Opts);
   FileCoverageSummary Totals("TOTALS");
-  auto FileReports = CoverageReport::prepareFileReports(
-      Coverage, Totals, SourceFiles, Opts, Filters);
+  auto FileReports =
+      CoverageReport::prepareFileReports(Coverage, Totals, SourceFiles, Opts);
   bool EmptyFiles = false;
   for (unsigned I = 0, E = FileReports.size(); I < E; ++I) {
     if (FileReports[I].FunctionCoverage.getNumFunctions())
@@ -620,7 +620,7 @@ void SourceCoverageViewHTML::renderExpansionView(raw_ostream &OS,
                                                  unsigned ViewDepth) {
   OS << BeginExpansionDiv;
   ESV.View->print(OS, /*WholeFile=*/false, /*ShowSourceName=*/false,
-                  /*ShowTitle=*/false, ViewDepth + 1);
+                  ViewDepth + 1);
   OS << EndExpansionDiv;
 }
 
@@ -636,7 +636,7 @@ void SourceCoverageViewHTML::renderInstantiationView(raw_ostream &OS,
        << EndSourceNameDiv;
   else
     ISV.View->print(OS, /*WholeFile=*/false, /*ShowSourceName=*/true,
-                    /*ShowTitle=*/false, ViewDepth);
+                    ViewDepth);
   OS << EndExpansionDiv;
 }
 
diff --git a/llvm/tools/llvm-cov/SourceCoverageViewHTML.h b/llvm/tools/llvm-cov/SourceCoverageViewHTML.h
index e11111a..8cb7356 100644
--- a/llvm/tools/llvm-cov/SourceCoverageViewHTML.h
+++ b/llvm/tools/llvm-cov/SourceCoverageViewHTML.h
@@ -29,8 +29,7 @@ public:
   void closeViewFile(OwnedStream OS) override;
 
   Error createIndexFile(ArrayRef SourceFiles,
-                        const coverage::CoverageMapping &Coverage,
-                        const CoverageFilter &Filters) override;
+                        const coverage::CoverageMapping &Coverage) override;
 
   CoveragePrinterHTML(const CoverageViewOptions &Opts)
       : CoveragePrinter(Opts) {}
diff --git a/llvm/tools/llvm-cov/SourceCoverageViewText.cpp b/llvm/tools/llvm-cov/SourceCoverageViewText.cpp
index b2902df1..a78c057 100644
--- a/llvm/tools/llvm-cov/SourceCoverageViewText.cpp
+++ b/llvm/tools/llvm-cov/SourceCoverageViewText.cpp
@@ -30,7 +30,7 @@ void CoveragePrinterText::closeViewFile(OwnedStream OS) {
 
 Error CoveragePrinterText::createIndexFile(
     ArrayRef SourceFiles,
-    const coverage::CoverageMapping &Coverage, const CoverageFilter &Filters) {
+    const coverage::CoverageMapping &Coverage) {
   auto OSOrErr = createOutputStream("index", "txt", /*InToplevel=*/true);
   if (Error E = OSOrErr.takeError())
     return E;
@@ -38,7 +38,7 @@ Error CoveragePrinterText::createIndexFile(
   raw_ostream &OSRef = *OS.get();
 
   CoverageReport Report(Opts, Coverage);
-  Report.renderFileReports(OSRef, SourceFiles, Filters);
+  Report.renderFileReports(OSRef, SourceFiles);
 
   Opts.colored_ostream(OSRef, raw_ostream::CYAN) << "\n"
                                                  << Opts.getLLVMVersionString();
@@ -210,7 +210,7 @@ void SourceCoverageViewText::renderExpansionView(raw_ostream &OS,
     errs() << "Expansion at line " << ESV.getLine() << ", " << ESV.getStartCol()
            << " -> " << ESV.getEndCol() << '\n';
   ESV.View->print(OS, /*WholeFile=*/false, /*ShowSourceName=*/false,
-                  /*ShowTitle=*/false, ViewDepth + 1);
+                  ViewDepth + 1);
 }
 
 void SourceCoverageViewText::renderInstantiationView(raw_ostream &OS,
@@ -223,7 +223,7 @@ void SourceCoverageViewText::renderInstantiationView(raw_ostream &OS,
         << "Unexecuted instantiation: " << ISV.FunctionName << "\n";
   else
     ISV.View->print(OS, /*WholeFile=*/false, /*ShowSourceName=*/true,
-                    /*ShowTitle=*/false, ViewDepth);
+                    ViewDepth);
 }
 
 void SourceCoverageViewText::renderTitle(raw_ostream &OS, StringRef Title) {
diff --git a/llvm/tools/llvm-cov/SourceCoverageViewText.h b/llvm/tools/llvm-cov/SourceCoverageViewText.h
index 3a04070..c3f20de 100644
--- a/llvm/tools/llvm-cov/SourceCoverageViewText.h
+++ b/llvm/tools/llvm-cov/SourceCoverageViewText.h
@@ -27,8 +27,7 @@ public:
   void closeViewFile(OwnedStream OS) override;
 
   Error createIndexFile(ArrayRef SourceFiles,
-                        const coverage::CoverageMapping &Coverage,
-                        const CoverageFilter &Filters) override;
+                        const coverage::CoverageMapping &Coverage) override;
 
   CoveragePrinterText(const CoverageViewOptions &Opts)
       : CoveragePrinter(Opts) {}
-- 
2.7.4