mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-29 10:32:47 +00:00
Rework conditional for printing out pub sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191571 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
18ebd48960
commit
5972df2696
@ -40,22 +40,20 @@ static void dumpPubSection(raw_ostream &OS, StringRef Name, StringRef Data,
|
|||||||
if (GnuStyle)
|
if (GnuStyle)
|
||||||
OS << "Offset Linkage Kind Name\n";
|
OS << "Offset Linkage Kind Name\n";
|
||||||
else
|
else
|
||||||
OS << "Offset Name\n";
|
OS << "Offset Name\n";
|
||||||
|
|
||||||
while (offset < Data.size()) {
|
while (offset < Data.size()) {
|
||||||
uint32_t dieRef = pubNames.getU32(&offset);
|
uint32_t dieRef = pubNames.getU32(&offset);
|
||||||
if (dieRef == 0)
|
if (dieRef == 0)
|
||||||
break;
|
break;
|
||||||
|
OS << format("0x%8.8x ", dieRef);
|
||||||
if (GnuStyle) {
|
if (GnuStyle) {
|
||||||
PubIndexEntryDescriptor desc(pubNames.getU8(&offset));
|
PubIndexEntryDescriptor desc(pubNames.getU8(&offset));
|
||||||
OS << format("0x%8.8x ", dieRef)
|
OS << format("%-8s", dwarf::GDBIndexEntryLinkageString(desc.Linkage))
|
||||||
<< format("%-8s", dwarf::GDBIndexEntryLinkageString(desc.Linkage))
|
|
||||||
<< ' ' << format("%-8s", dwarf::GDBIndexEntryKindString(desc.Kind))
|
<< ' ' << format("%-8s", dwarf::GDBIndexEntryKindString(desc.Kind))
|
||||||
<< ' ' << '\"' << pubNames.getCStr(&offset) << "\"\n";
|
<< ' ';
|
||||||
} else {
|
|
||||||
OS << format("0x%8.8x ", dieRef);
|
|
||||||
OS << '\"' << pubNames.getCStr(&offset) << "\"\n";
|
|
||||||
}
|
}
|
||||||
|
OS << '\"' << pubNames.getCStr(&offset) << "\"\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user