[PATCH] D89637: Fix various format specifier mismatches
Hubert Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 18 09:47:40 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2980ce98be11: Fix various format specifier mismatches (authored by hubert.reinterpretcast).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89637/new/
https://reviews.llvm.org/D89637
Files:
llvm/lib/Object/COFFObjectFile.cpp
llvm/lib/ProfileData/GCOV.cpp
llvm/tools/llvm-readobj/ELFDumper.cpp
Index: llvm/tools/llvm-readobj/ELFDumper.cpp
===================================================================
--- llvm/tools/llvm-readobj/ELFDumper.cpp
+++ llvm/tools/llvm-readobj/ELFDumper.cpp
@@ -5560,7 +5560,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();
Index: llvm/lib/ProfileData/GCOV.cpp
===================================================================
--- llvm/lib/ProfileData/GCOV.cpp
+++ 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);
}
Index: llvm/lib/Object/COFFObjectFile.cpp
===================================================================
--- llvm/lib/Object/COFFObjectFile.cpp
+++ llvm/lib/Object/COFFObjectFile.cpp
@@ -28,8 +28,8 @@
#include "llvm/Support/MemoryBuffer.h"
#include <algorithm>
#include <cassert>
+#include <cinttypes>
#include <cstddef>
-#include <cstdint>
#include <cstring>
#include <limits>
#include <memory>
@@ -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<uint32_t>(DataEntry->Size), DirSize);
uintptr_t IntPtr = 0;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89637.298877.patch
Type: text/x-patch
Size: 2392 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201018/bc3aa3bb/attachment-0001.bin>
More information about the llvm-commits
mailing list