mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-26 23:32:58 +00:00
Fix uses of the C99 PRI format macros not to conflict with C++11 UDLs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152474 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ff0275ea53
commit
51cf866163
@ -204,9 +204,10 @@ static void SortAndPrintSymbolList() {
|
|||||||
strcpy(SymbolSizeStr, " ");
|
strcpy(SymbolSizeStr, " ");
|
||||||
|
|
||||||
if (i->Address != object::UnknownAddressOrSize)
|
if (i->Address != object::UnknownAddressOrSize)
|
||||||
format("%08"PRIx64, i->Address).print(SymbolAddrStr, sizeof(SymbolAddrStr));
|
format("%08" PRIx64, i->Address).print(SymbolAddrStr,
|
||||||
|
sizeof(SymbolAddrStr));
|
||||||
if (i->Size != object::UnknownAddressOrSize)
|
if (i->Size != object::UnknownAddressOrSize)
|
||||||
format("%08"PRIx64, i->Size).print(SymbolSizeStr, sizeof(SymbolSizeStr));
|
format("%08" PRIx64, i->Size).print(SymbolSizeStr, sizeof(SymbolSizeStr));
|
||||||
|
|
||||||
if (OutputFormat == posix) {
|
if (OutputFormat == posix) {
|
||||||
outs() << i->Name << " " << i->TypeChar << " "
|
outs() << i->Name << " " << i->TypeChar << " "
|
||||||
|
@ -300,7 +300,7 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) {
|
|||||||
|
|
||||||
if (DisAsm->getInstruction(Inst, Size, memoryObject, Index,
|
if (DisAsm->getInstruction(Inst, Size, memoryObject, Index,
|
||||||
DebugOut, nulls())) {
|
DebugOut, nulls())) {
|
||||||
outs() << format("%8"PRIx64":\t", SectionAddr + Index);
|
outs() << format("%8" PRIx64 ":\t", SectionAddr + Index);
|
||||||
DumpBytes(StringRef(Bytes.data() + Index, Size));
|
DumpBytes(StringRef(Bytes.data() + Index, Size));
|
||||||
IP->printInst(&Inst, outs(), "");
|
IP->printInst(&Inst, outs(), "");
|
||||||
outs() << "\n";
|
outs() << "\n";
|
||||||
@ -327,8 +327,8 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) {
|
|||||||
if (error(rel_cur->getTypeName(name))) goto skip_print_rel;
|
if (error(rel_cur->getTypeName(name))) goto skip_print_rel;
|
||||||
if (error(rel_cur->getValueString(val))) goto skip_print_rel;
|
if (error(rel_cur->getValueString(val))) goto skip_print_rel;
|
||||||
|
|
||||||
outs() << format("\t\t\t%8"PRIx64": ", SectionAddr + addr) << name << "\t"
|
outs() << format("\t\t\t%8" PRIx64 ": ", SectionAddr + addr) << name
|
||||||
<< val << "\n";
|
<< "\t" << val << "\n";
|
||||||
|
|
||||||
skip_print_rel:
|
skip_print_rel:
|
||||||
++rel_cur;
|
++rel_cur;
|
||||||
@ -388,8 +388,8 @@ static void PrintSectionHeaders(const ObjectFile *o) {
|
|||||||
if (error(si->isBSS(BSS))) return;
|
if (error(si->isBSS(BSS))) return;
|
||||||
std::string Type = (std::string(Text ? "TEXT " : "") +
|
std::string Type = (std::string(Text ? "TEXT " : "") +
|
||||||
(Data ? "DATA " : "") + (BSS ? "BSS" : ""));
|
(Data ? "DATA " : "") + (BSS ? "BSS" : ""));
|
||||||
outs() << format("%3d %-13s %09"PRIx64" %017"PRIx64" %s\n", i, Name.str().c_str(), Size,
|
outs() << format("%3d %-13s %09" PRIx64 " %017" PRIx64 " %s\n",
|
||||||
Address, Type.c_str());
|
i, Name.str().c_str(), Size, Address, Type.c_str());
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -411,7 +411,7 @@ static void PrintSectionContents(const ObjectFile *o) {
|
|||||||
|
|
||||||
// Dump out the content as hex and printable ascii characters.
|
// Dump out the content as hex and printable ascii characters.
|
||||||
for (std::size_t addr = 0, end = Contents.size(); addr < end; addr += 16) {
|
for (std::size_t addr = 0, end = Contents.size(); addr < end; addr += 16) {
|
||||||
outs() << format(" %04"PRIx64" ", BaseAddr + addr);
|
outs() << format(" %04" PRIx64 " ", BaseAddr + addr);
|
||||||
// Dump line of hex.
|
// Dump line of hex.
|
||||||
for (std::size_t i = 0; i < 16; ++i) {
|
for (std::size_t i = 0; i < 16; ++i) {
|
||||||
if (i != 0 && i % 4 == 0)
|
if (i != 0 && i % 4 == 0)
|
||||||
@ -519,7 +519,7 @@ static void PrintSymbolTable(const ObjectFile *o) {
|
|||||||
else if (Type == SymbolRef::ST_Function)
|
else if (Type == SymbolRef::ST_Function)
|
||||||
FileFunc = 'F';
|
FileFunc = 'F';
|
||||||
|
|
||||||
outs() << format("%08"PRIx64, Address) << " "
|
outs() << format("%08" PRIx64, Address) << " "
|
||||||
<< GlobLoc // Local -> 'l', Global -> 'g', Neither -> ' '
|
<< GlobLoc // Local -> 'l', Global -> 'g', Neither -> ' '
|
||||||
<< (Weak ? 'w' : ' ') // Weak?
|
<< (Weak ? 'w' : ' ') // Weak?
|
||||||
<< ' ' // Constructor. Not supported yet.
|
<< ' ' // Constructor. Not supported yet.
|
||||||
@ -539,7 +539,7 @@ static void PrintSymbolTable(const ObjectFile *o) {
|
|||||||
outs() << SectionName;
|
outs() << SectionName;
|
||||||
}
|
}
|
||||||
outs() << '\t'
|
outs() << '\t'
|
||||||
<< format("%08"PRIx64" ", Size)
|
<< format("%08" PRIx64 " ", Size)
|
||||||
<< Name
|
<< Name
|
||||||
<< '\n';
|
<< '\n';
|
||||||
}
|
}
|
||||||
|
@ -109,9 +109,9 @@ void DumpSymbol(const SymbolRef &Sym, const ObjectFile *obj, bool IsDynamic) {
|
|||||||
// format() can't handle StringRefs
|
// format() can't handle StringRefs
|
||||||
outs() << format(" %-32s", FullName.c_str())
|
outs() << format(" %-32s", FullName.c_str())
|
||||||
<< format(" %-4s", GetTypeStr(Type))
|
<< format(" %-4s", GetTypeStr(Type))
|
||||||
<< format(" %16"PRIx64, Address)
|
<< format(" %16" PRIx64, Address)
|
||||||
<< format(" %16"PRIx64, Size)
|
<< format(" %16" PRIx64, Size)
|
||||||
<< format(" %16"PRIx64, FileOffset)
|
<< format(" %16" PRIx64, FileOffset)
|
||||||
<< " " << GetFlagStr(Flags)
|
<< " " << GetFlagStr(Flags)
|
||||||
<< "\n";
|
<< "\n";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user