mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
llvm-cov/CoverageReport.cpp: Quick fix for msvcrt, since width specifier "z" is unavailable.
Note, mingw uses its own printf instead of msvcrt. llvm-svn: 218723
This commit is contained in:
parent
64893e0425
commit
79112cc68c
@ -110,17 +110,17 @@ static raw_ostream::Colors determineCoveragePercentageColor(const T &Info) {
|
||||
|
||||
void CoverageReport::render(const FileCoverageSummary &File, raw_ostream &OS) {
|
||||
OS << column(File.Name, FileReportColumns[0], Column::LeftTrim)
|
||||
<< format("%*zd", FileReportColumns[1], File.RegionCoverage.NumRegions);
|
||||
<< format("%*u", FileReportColumns[1], (unsigned)File.RegionCoverage.NumRegions);
|
||||
Options.colored_ostream(OS, File.RegionCoverage.isFullyCovered()
|
||||
? raw_ostream::GREEN
|
||||
: raw_ostream::RED)
|
||||
<< format("%*zd", FileReportColumns[2], File.RegionCoverage.NotCovered);
|
||||
<< format("%*u", FileReportColumns[2], (unsigned)File.RegionCoverage.NotCovered);
|
||||
Options.colored_ostream(OS,
|
||||
determineCoveragePercentageColor(File.RegionCoverage))
|
||||
<< format("%*.2f", FileReportColumns[3] - 1,
|
||||
File.RegionCoverage.getPercentCovered()) << '%';
|
||||
OS << format("%*zd", FileReportColumns[4],
|
||||
File.FunctionCoverage.NumFunctions);
|
||||
OS << format("%*u", FileReportColumns[4],
|
||||
(unsigned)File.FunctionCoverage.NumFunctions);
|
||||
Options.colored_ostream(
|
||||
OS, determineCoveragePercentageColor(File.FunctionCoverage))
|
||||
<< format("%*.2f", FileReportColumns[5] - 1,
|
||||
@ -131,24 +131,24 @@ void CoverageReport::render(const FileCoverageSummary &File, raw_ostream &OS) {
|
||||
void CoverageReport::render(const FunctionCoverageSummary &Function,
|
||||
raw_ostream &OS) {
|
||||
OS << column(Function.Name, FunctionReportColumns[0], Column::RightTrim)
|
||||
<< format("%*zd", FunctionReportColumns[1],
|
||||
Function.RegionCoverage.NumRegions);
|
||||
<< format("%*u", FunctionReportColumns[1],
|
||||
(unsigned)Function.RegionCoverage.NumRegions);
|
||||
Options.colored_ostream(OS, Function.RegionCoverage.isFullyCovered()
|
||||
? raw_ostream::GREEN
|
||||
: raw_ostream::RED)
|
||||
<< format("%*zd", FunctionReportColumns[2],
|
||||
Function.RegionCoverage.NotCovered);
|
||||
<< format("%*u", FunctionReportColumns[2],
|
||||
(unsigned)Function.RegionCoverage.NotCovered);
|
||||
Options.colored_ostream(
|
||||
OS, determineCoveragePercentageColor(Function.RegionCoverage))
|
||||
<< format("%*.2f", FunctionReportColumns[3] - 1,
|
||||
Function.RegionCoverage.getPercentCovered()) << '%';
|
||||
OS << format("%*zd", FunctionReportColumns[4],
|
||||
Function.LineCoverage.NumLines);
|
||||
OS << format("%*u", FunctionReportColumns[4],
|
||||
(unsigned)Function.LineCoverage.NumLines);
|
||||
Options.colored_ostream(OS, Function.LineCoverage.isFullyCovered()
|
||||
? raw_ostream::GREEN
|
||||
: raw_ostream::RED)
|
||||
<< format("%*zd", FunctionReportColumns[5],
|
||||
Function.LineCoverage.NotCovered);
|
||||
<< format("%*u", FunctionReportColumns[5],
|
||||
(unsigned)Function.LineCoverage.NotCovered);
|
||||
Options.colored_ostream(
|
||||
OS, determineCoveragePercentageColor(Function.LineCoverage))
|
||||
<< format("%*.2f", FunctionReportColumns[6] - 1,
|
||||
|
Loading…
Reference in New Issue
Block a user