}
std::vector<FileCoverageSummary>
-CoverageReport::prepareFileReports(FileCoverageSummary &Totals,
- ArrayRef<StringRef> Files) const {
+CoverageReport::prepareFileReports(const coverage::CoverageMapping &Coverage,
+ FileCoverageSummary &Totals,
+ ArrayRef<StringRef> Files) {
std::vector<FileCoverageSummary> FileReports;
unsigned LCP = 0;
if (Files.size() > 1)
void CoverageReport::renderFileReports(raw_ostream &OS,
ArrayRef<StringRef> Files) const {
FileCoverageSummary Totals("TOTAL");
- auto FileReports = prepareFileReports(Totals, Files);
+ auto FileReports = prepareFileReports(Coverage, Totals, Files);
std::vector<StringRef> Filenames;
for (const FileCoverageSummary &FCS : FileReports)
void renderFunctionReports(ArrayRef<StringRef> Files, raw_ostream &OS);
/// Prepare file reports for the files specified in \p Files.
- std::vector<FileCoverageSummary>
- prepareFileReports(FileCoverageSummary &Totals,
- ArrayRef<StringRef> Files) const;
+ static std::vector<FileCoverageSummary>
+ prepareFileReports(const coverage::CoverageMapping &Coverage,
+ FileCoverageSummary &Totals, ArrayRef<StringRef> Files);
/// Render file reports for every unique file in the coverage mapping.
void renderFileReports(raw_ostream &OS) const;
OSRef << tag(CreatedTimeTag, escape(Opts.CreatedTimeStr, Opts));
// Emit a table containing links to reports for each file in the covmapping.
- CoverageReport Report(Opts, Coverage);
OSRef << BeginCenteredDiv << BeginTable;
emitColumnLabelsForIndex(OSRef);
FileCoverageSummary Totals("TOTALS");
- auto FileReports = Report.prepareFileReports(Totals, SourceFiles);
+ auto FileReports =
+ CoverageReport::prepareFileReports(Coverage, Totals, SourceFiles);
for (unsigned I = 0, E = FileReports.size(); I < E; ++I)
emitFileSummary(OSRef, SourceFiles[I], FileReports[I]);
emitFileSummary(OSRef, "Totals", Totals, /*IsTotals=*/true);