@@ -200,12 +200,14 @@ void CoverageReport::render(const FileCoverageSummary &File,
200
200
}
201
201
202
202
void CoverageReport::render (const FunctionCoverageSummary &Function,
203
+ const DemangleCache &DC,
203
204
raw_ostream &OS) const {
204
205
auto FuncCoverageColor =
205
206
determineCoveragePercentageColor (Function.RegionCoverage );
206
207
auto LineCoverageColor =
207
208
determineCoveragePercentageColor (Function.LineCoverage );
208
- OS << column (Function.Name , FunctionReportColumns[0 ], Column::RightTrim)
209
+ OS << column (DC.demangle (Function.Name ), FunctionReportColumns[0 ],
210
+ Column::RightTrim)
209
211
<< format (" %*u" , FunctionReportColumns[1 ],
210
212
(unsigned )Function.RegionCoverage .NumRegions );
211
213
Options.colored_ostream (OS, FuncCoverageColor)
@@ -230,6 +232,7 @@ void CoverageReport::render(const FunctionCoverageSummary &Function,
230
232
}
231
233
232
234
void CoverageReport::renderFunctionReports (ArrayRef<std::string> Files,
235
+ const DemangleCache &DC,
233
236
raw_ostream &OS) {
234
237
bool isFirst = true ;
235
238
for (StringRef Filename : Files) {
@@ -242,7 +245,7 @@ void CoverageReport::renderFunctionReports(ArrayRef<std::string> Files,
242
245
243
246
std::vector<StringRef> Funcnames;
244
247
for (const auto &F : Functions)
245
- Funcnames.emplace_back (F.Name );
248
+ Funcnames.emplace_back (DC. demangle ( F.Name ) );
246
249
adjustColumnWidths ({}, Funcnames);
247
250
248
251
OS << " File '" << Filename << " ':\n " ;
@@ -262,12 +265,12 @@ void CoverageReport::renderFunctionReports(ArrayRef<std::string> Files,
262
265
++Totals.ExecutionCount ;
263
266
Totals.RegionCoverage += Function.RegionCoverage ;
264
267
Totals.LineCoverage += Function.LineCoverage ;
265
- render (Function, OS);
268
+ render (Function, DC, OS);
266
269
}
267
270
if (Totals.ExecutionCount ) {
268
271
renderDivider (FunctionReportColumns, OS);
269
272
OS << " \n " ;
270
- render (Totals, OS);
273
+ render (Totals, DC, OS);
271
274
}
272
275
}
273
276
}
0 commit comments