diff options
Diffstat (limited to 'llvm/tools/llvm-cov/CoverageExporterLcov.cpp')
-rw-r--r-- | llvm/tools/llvm-cov/CoverageExporterLcov.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/llvm/tools/llvm-cov/CoverageExporterLcov.cpp b/llvm/tools/llvm-cov/CoverageExporterLcov.cpp index d9b0c3b0d7a88..a6b3c66070304 100644 --- a/llvm/tools/llvm-cov/CoverageExporterLcov.cpp +++ b/llvm/tools/llvm-cov/CoverageExporterLcov.cpp @@ -78,10 +78,11 @@ void renderLineSummary(raw_ostream &OS, const FileCoverageSummary &Summary) { void renderFile(raw_ostream &OS, const coverage::CoverageMapping &Coverage, const std::string &Filename, - const FileCoverageSummary &FileReport, bool ExportSummaryOnly) { + const FileCoverageSummary &FileReport, bool ExportSummaryOnly, + bool SkipFunctions) { OS << "SF:" << Filename << '\n'; - if (!ExportSummaryOnly) { + if (!ExportSummaryOnly && !SkipFunctions) { renderFunctions(OS, Coverage.getCoveredFunctions(Filename)); } renderFunctionSummary(OS, FileReport); @@ -99,9 +100,10 @@ void renderFile(raw_ostream &OS, const coverage::CoverageMapping &Coverage, void renderFiles(raw_ostream &OS, const coverage::CoverageMapping &Coverage, ArrayRef<std::string> SourceFiles, ArrayRef<FileCoverageSummary> FileReports, - bool ExportSummaryOnly) { + bool ExportSummaryOnly, bool SkipFunctions) { for (unsigned I = 0, E = SourceFiles.size(); I < E; ++I) - renderFile(OS, Coverage, SourceFiles[I], FileReports[I], ExportSummaryOnly); + renderFile(OS, Coverage, SourceFiles[I], FileReports[I], ExportSummaryOnly, + SkipFunctions); } } // end anonymous namespace @@ -119,6 +121,6 @@ void CoverageExporterLcov::renderRoot(ArrayRef<std::string> SourceFiles) { FileCoverageSummary Totals = FileCoverageSummary("Totals"); auto FileReports = CoverageReport::prepareFileReports(Coverage, Totals, SourceFiles, Options); - renderFiles(OS, Coverage, SourceFiles, FileReports, - Options.ExportSummaryOnly); + renderFiles(OS, Coverage, SourceFiles, FileReports, Options.ExportSummaryOnly, + Options.SkipFunctions); } |