From fa8ef35e786b59d2916a7358c30c1489a7d79b19 Mon Sep 17 00:00:00 2001 From: Sean Eveson Date: Thu, 28 Sep 2017 10:07:30 +0000 Subject: [llvm-cov] Create directory structure when filtering using -name*= options Before this change using any of the -name*= command line options with an output directory would result in a single file (functions.txt/functions.html) containing the coverage for those specific functions. Now you get the same directory structure as when not using any -name*= options. Differential Revision: https://reviews.llvm.org/D38280 llvm-svn: 314396 --- llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp') diff --git a/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp b/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp index 300a016..a031f18 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 coverage::CoverageMapping &Coverage, const CoverageFilter &Filters) { // 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); + auto FileReports = CoverageReport::prepareFileReports( + Coverage, Totals, SourceFiles, Opts, Filters); 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, - ViewDepth + 1); + /*ShowTitle=*/false, ViewDepth + 1); OS << EndExpansionDiv; } @@ -636,7 +636,7 @@ void SourceCoverageViewHTML::renderInstantiationView(raw_ostream &OS, << EndSourceNameDiv; else ISV.View->print(OS, /*WholeFile=*/false, /*ShowSourceName=*/true, - ViewDepth); + /*ShowTitle=*/false, ViewDepth); OS << EndExpansionDiv; } -- cgit v1.1