From 617499fe6c57a8a9c804d8dccd9d32d80c04152a Mon Sep 17 00:00:00 2001 From: Kaelyn Uhrain Date: Mon, 6 Jan 2014 23:17:27 +0000 Subject: [PATCH] Use the PRIu64 macro for printing a uint64_t. Otherwise on (some) 64-bit systems, -Wformat will trigger a warning because uint64_t is an 'unsigned long' not an 'unsigned long long'. Consequently, PGOProfiling.c would fail to build if -Werror and -Wformat are both enabled. llvm-svn: 198644 --- compiler-rt/lib/profile/PGOProfiling.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler-rt/lib/profile/PGOProfiling.c b/compiler-rt/lib/profile/PGOProfiling.c index 5bb216a..6c728dd 100644 --- a/compiler-rt/lib/profile/PGOProfiling.c +++ b/compiler-rt/lib/profile/PGOProfiling.c @@ -7,6 +7,7 @@ |* \*===----------------------------------------------------------------------===*/ +#include #include #include @@ -37,7 +38,7 @@ void llvm_pgo_emit(const char *MangledName, uint32_t NumCounters, uint32_t i; fprintf(OutputFile, "%s %u\n", MangledName, NumCounters); for (i = 0; i < NumCounters; ++i) - fprintf(OutputFile, "%llu\n", Counters[i]); + fprintf(OutputFile, "%" PRIu64 "\n", Counters[i]); fprintf(OutputFile, "\n"); } -- 2.7.4