1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

[llvm-cov] Fix incorrect usage of .precision specifier in format() call.

Summary: Existing version doesn't work on Windows as it always prints 0.00.

Reviewers: Dor1s

Reviewed By: Dor1s

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D42767

llvm-svn: 323923
This commit is contained in:
Max Moroz 2018-01-31 22:13:07 +00:00
parent d4c615be8c
commit bdb7e4035e

View File

@ -343,7 +343,7 @@ void CoveragePrinterHTML::emitFileSummary(raw_ostream &OS, StringRef SF,
{
raw_string_ostream RSO{S};
if (Total)
RSO << format("%6.2f", 7, Pctg) << "% ";
RSO << format("%*.2f", 7, Pctg) << "% ";
else
RSO << "- ";
RSO << '(' << Hit << '/' << Total << ')';