Skip to content

Commit

Permalink
uint64 formatted output: replaced %llx with PRIx64 macro.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143191 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
kaomoneus committed Oct 28, 2011
1 parent 91bbe23 commit 9df3b91
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions tools/llvm-nm/llvm-nm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ static void SortAndPrintSymbolList() {
strcpy(SymbolSizeStr, " ");

if (i->Address != object::UnknownAddressOrSize)
format("%08llx", i->Address).print(SymbolAddrStr, sizeof(SymbolAddrStr));
format("%08"PRIx64, i->Address).print(SymbolAddrStr, sizeof(SymbolAddrStr));
if (i->Size != object::UnknownAddressOrSize)
format("%08llx", i->Size).print(SymbolSizeStr, sizeof(SymbolSizeStr));
format("%08"PRIx64, i->Size).print(SymbolSizeStr, sizeof(SymbolSizeStr));

if (OutputFormat == posix) {
outs() << i->Name << " " << i->TypeChar << " "
Expand Down
10 changes: 5 additions & 5 deletions tools/llvm-objdump/llvm-objdump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) {

if (DisAsm->getInstruction(Inst, Size, memoryObject, Index,
DebugOut, nulls())) {
outs() << format("%8llx:\t", SectionAddr + Index);
outs() << format("%8"PRIx64":\t", SectionAddr + Index);
DumpBytes(StringRef(Bytes.data() + Index, Size));
IP->printInst(&Inst, outs(), "");
outs() << "\n";
Expand All @@ -316,7 +316,7 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) {
if (error(rel_cur->getTypeName(name))) goto skip_print_rel;
if (error(rel_cur->getValueString(val))) goto skip_print_rel;

outs() << format("\t\t\t%8llx: ", SectionAddr + addr) << name << "\t"
outs() << format("\t\t\t%8"PRIx64": ", SectionAddr + addr) << name << "\t"
<< val << "\n";

skip_print_rel:
Expand Down Expand Up @@ -400,7 +400,7 @@ static void PrintSectionContents(const ObjectFile *o) {

// Dump out the content as hex and printable ascii characters.
for (std::size_t addr = 0, end = Contents.size(); addr < end; addr += 16) {
outs() << format(" %04llx ", BaseAddr + addr);
outs() << format(" %04"PRIx64" ", BaseAddr + addr);
// Dump line of hex.
for (std::size_t i = 0; i < 16; ++i) {
if (i != 0 && i % 4 == 0)
Expand Down Expand Up @@ -506,7 +506,7 @@ static void PrintSymbolTable(const ObjectFile *o) {
else if (Type == SymbolRef::ST_Function)
FileFunc = 'F';

outs() << format("%08llx", Offset) << " "
outs() << format("%08"PRIx64, Offset) << " "
<< GlobLoc // Local -> 'l', Global -> 'g', Neither -> ' '
<< (Weak ? 'w' : ' ') // Weak?
<< ' ' // Constructor. Not supported yet.
Expand All @@ -526,7 +526,7 @@ static void PrintSymbolTable(const ObjectFile *o) {
outs() << SectionName;
}
outs() << '\t'
<< format("%08llx ", Size)
<< format("%08"PRIx64" ", Size)
<< Name
<< '\n';
}
Expand Down

0 comments on commit 9df3b91

Please sign in to comment.