1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00

[PGO] Fix the type of the formated variable

Change the format type of Value to PRIu64 since it is a uint64_t.
The problem was detected on mips boards building 32-bit binaries,
where it was printing junk values and causing test failure.

Patch by Milos Stojanovic.

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

llvm-svn: 353194
This commit is contained in:
Petar Jovanovic 2019-02-05 18:09:28 +00:00
parent f2fda35e11
commit 3354b4cc76

View File

@ -642,7 +642,7 @@ static void traverseAllValueSites(const InstrProfRecord &Func, uint32_t VK,
for (uint32_t V = 0; V < NV; V++) {
OS << "\t[ " << format("%2u", I) << ", ";
if (Symtab == nullptr)
OS << format("%4u", VD[V].Value);
OS << format("%4" PRIu64, VD[V].Value);
else
OS << Symtab->getFuncName(VD[V].Value);
OS << ", " << format("%10" PRId64, VD[V].Count) << " ] ("