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/SourceCoverageViewText.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'llvm/tools/llvm-cov/SourceCoverageViewText.cpp') diff --git a/llvm/tools/llvm-cov/SourceCoverageViewText.cpp b/llvm/tools/llvm-cov/SourceCoverageViewText.cpp index a78c057..b2902df1 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 coverage::CoverageMapping &Coverage, const CoverageFilter &Filters) { 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); + Report.renderFileReports(OSRef, SourceFiles, Filters); 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, - ViewDepth + 1); + /*ShowTitle=*/false, 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, - ViewDepth); + /*ShowTitle=*/false, ViewDepth); } void SourceCoverageViewText::renderTitle(raw_ostream &OS, StringRef Title) { -- cgit v1.1