[llvm] r353194 - [PGO] Fix the type of the formated variable
Petar Jovanovic via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 5 10:09:29 PST 2019
Author: petarj
Date: Tue Feb 5 10:09:28 2019
New Revision: 353194
URL: http://llvm.org/viewvc/llvm-project?rev=353194&view=rev
Log:
[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
Modified:
llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp
Modified: llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp?rev=353194&r1=353193&r2=353194&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp (original)
+++ llvm/trunk/tools/llvm-profdata/llvm-profdata.cpp Tue Feb 5 10:09:28 2019
@@ -642,7 +642,7 @@ static void traverseAllValueSites(const
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) << " ] ("
More information about the llvm-commits
mailing list