[PATCH] D28957: Fix incorrect formatting of DataRefImpl members in operator<< function
Filipe Cabecinhas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 9 08:46:18 PST 2017
filcab added inline comments.
================
Comment at: include/llvm/Object/SymbolicFile.h:35
+
template <typename OStream>
----------------
Please don't add whitespace.
================
Comment at: include/llvm/Object/SymbolicFile.h:38
OStream& operator<<(OStream &OS, const DataRefImpl &D) {
- OS << "(" << format("0x%x8", D.p) << " (" << format("0x%x8", D.d.a) << ", " << format("0x%x8", D.d.b) << "))";
+ OS << "(" << format("0x%08x" PRIxPTR, D.p) << " (" << format("0x%08x", D.d.a) << ", " << format("0x%08x", D.d.b) << "))";
return OS;
----------------
Shouldn't it be `"...%" PRIxPTR`?
Why change the way it dumps pointers, though? Even for `uint32_t`, we're dumping as 8B. Why not always dump as 8B and be done with it?
Repository:
rL LLVM
https://reviews.llvm.org/D28957
More information about the llvm-commits
mailing list