@@ -78,10 +78,11 @@ void renderLineSummary(raw_ostream &OS, const FileCoverageSummary &Summary) {
78
78
79
79
void renderFile (raw_ostream &OS, const coverage::CoverageMapping &Coverage,
80
80
const std::string &Filename,
81
- const FileCoverageSummary &FileReport, bool ExportSummaryOnly) {
81
+ const FileCoverageSummary &FileReport, bool ExportSummaryOnly,
82
+ bool SkipFunctions) {
82
83
OS << " SF:" << Filename << ' \n ' ;
83
84
84
- if (!ExportSummaryOnly) {
85
+ if (!ExportSummaryOnly && !SkipFunctions ) {
85
86
renderFunctions (OS, Coverage.getCoveredFunctions (Filename));
86
87
}
87
88
renderFunctionSummary (OS, FileReport);
@@ -99,9 +100,10 @@ void renderFile(raw_ostream &OS, const coverage::CoverageMapping &Coverage,
99
100
void renderFiles (raw_ostream &OS, const coverage::CoverageMapping &Coverage,
100
101
ArrayRef<std::string> SourceFiles,
101
102
ArrayRef<FileCoverageSummary> FileReports,
102
- bool ExportSummaryOnly) {
103
+ bool ExportSummaryOnly, bool SkipFunctions ) {
103
104
for (unsigned I = 0 , E = SourceFiles.size (); I < E; ++I)
104
- renderFile (OS, Coverage, SourceFiles[I], FileReports[I], ExportSummaryOnly);
105
+ renderFile (OS, Coverage, SourceFiles[I], FileReports[I], ExportSummaryOnly,
106
+ SkipFunctions);
105
107
}
106
108
107
109
} // end anonymous namespace
@@ -119,6 +121,6 @@ void CoverageExporterLcov::renderRoot(ArrayRef<std::string> SourceFiles) {
119
121
FileCoverageSummary Totals = FileCoverageSummary (" Totals" );
120
122
auto FileReports = CoverageReport::prepareFileReports (Coverage, Totals,
121
123
SourceFiles, Options);
122
- renderFiles (OS, Coverage, SourceFiles, FileReports,
123
- Options.ExportSummaryOnly );
124
+ renderFiles (OS, Coverage, SourceFiles, FileReports, Options. ExportSummaryOnly ,
125
+ Options.SkipFunctions );
124
126
}
0 commit comments