From: Petar Jovanovic Date: Tue, 5 Feb 2019 18:09:28 +0000 (+0000) Subject: [PGO] Fix the type of the formated variable X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=747f42fa4c7ffa051370a7465f376009294f5db0;p=llvm [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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353194 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/llvm-profdata/llvm-profdata.cpp b/tools/llvm-profdata/llvm-profdata.cpp index 05267fc0121..a8d94e838e8 100644 --- a/tools/llvm-profdata/llvm-profdata.cpp +++ b/tools/llvm-profdata/llvm-profdata.cpp @@ -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) << " ] ("