aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-09-27 22:10:10 +0000
committerEric Christopher <echristo@gmail.com>2013-09-27 22:10:10 +0000
commit5972df2696354b328b519bedc07d1c253648cf0e (patch)
treeeb64db3de7b887ad6a5f68d84493c0250924f03c
parent18ebd48960afe9a4e694dac3ba0ee1002044d297 (diff)
downloadexternal_llvm-5972df2696354b328b519bedc07d1c253648cf0e.zip
external_llvm-5972df2696354b328b519bedc07d1c253648cf0e.tar.gz
external_llvm-5972df2696354b328b519bedc07d1c253648cf0e.tar.bz2
Rework conditional for printing out pub sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191571 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/DebugInfo/DWARFContext.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/DebugInfo/DWARFContext.cpp b/lib/DebugInfo/DWARFContext.cpp
index 4e3b4b6..f8234e9 100644
--- a/lib/DebugInfo/DWARFContext.cpp
+++ b/lib/DebugInfo/DWARFContext.cpp
@@ -40,22 +40,20 @@ static void dumpPubSection(raw_ostream &OS, StringRef Name, StringRef Data,
if (GnuStyle)
OS << "Offset Linkage Kind Name\n";
else
- OS << "Offset Name\n";
+ OS << "Offset Name\n";
while (offset < Data.size()) {
uint32_t dieRef = pubNames.getU32(&offset);
if (dieRef == 0)
break;
+ OS << format("0x%8.8x ", dieRef);
if (GnuStyle) {
PubIndexEntryDescriptor desc(pubNames.getU8(&offset));
- OS << format("0x%8.8x ", dieRef)
- << format("%-8s", dwarf::GDBIndexEntryLinkageString(desc.Linkage))
+ OS << format("%-8s", dwarf::GDBIndexEntryLinkageString(desc.Linkage))
<< ' ' << 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";
}
}