diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp --- a/llvm/lib/Object/COFFObjectFile.cpp +++ b/llvm/lib/Object/COFFObjectFile.cpp @@ -28,8 +28,8 @@ #include "llvm/Support/MemoryBuffer.h" #include #include +#include #include -#include #include #include #include @@ -666,7 +666,7 @@ if (DataEntry->Size != DirSize) return createStringError( object_error::parse_failed, - "TLS Directory size (%u) is not the expected size (%u).", + "TLS Directory size (%u) is not the expected size (%" PRIu64 ").", static_cast(DataEntry->Size), DirSize); uintptr_t IntPtr = 0; diff --git a/llvm/lib/ProfileData/GCOV.cpp b/llvm/lib/ProfileData/GCOV.cpp --- a/llvm/lib/ProfileData/GCOV.cpp +++ b/llvm/lib/ProfileData/GCOV.cpp @@ -939,16 +939,16 @@ } void Context::printSummary(const Summary &summary, raw_ostream &os) const { - os << format("Lines executed:%.2f%% of %u\n", + os << format("Lines executed:%.2f%% of %" PRIu64 "\n", double(summary.linesExec) * 100 / summary.lines, summary.lines); if (options.BranchInfo) { if (summary.branches == 0) { os << "No branches\n"; } else { - os << format("Branches executed:%.2f%% of %u\n", + os << format("Branches executed:%.2f%% of %" PRIu64 "\n", double(summary.branchesExec) * 100 / summary.branches, summary.branches); - os << format("Taken at least once:%.2f%% of %u\n", + os << format("Taken at least once:%.2f%% of %" PRIu64 "\n", double(summary.branchesTaken) * 100 / summary.branches, summary.branches); } diff --git a/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp --- a/llvm/tools/llvm-readobj/ELFDumper.cpp +++ b/llvm/tools/llvm-readobj/ELFDumper.cpp @@ -5559,7 +5559,7 @@ << format_hex(Current.Offset, 1) << " contains " << SecEntries.size() << " entries:\n"; for (NameOffset Entry : SecEntries) - OS << " [" << format("%6tx", Entry.Offset) << "] " << Entry.Name + OS << " [" << format("%6" PRIx64, Entry.Offset) << "] " << Entry.Name << "\n"; OS << "\n"; SecEntries.clear();