[llvm] r191571 - Rework conditional for printing out pub sections.

Eric Christopher echristo at gmail.com
Fri Sep 27 15:10:10 PDT 2013


Author: echristo
Date: Fri Sep 27 17:10:10 2013
New Revision: 191571

URL: http://llvm.org/viewvc/llvm-project?rev=191571&view=rev
Log:
Rework conditional for printing out pub sections.

Modified:
    llvm/trunk/lib/DebugInfo/DWARFContext.cpp

Modified: llvm/trunk/lib/DebugInfo/DWARFContext.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFContext.cpp?rev=191571&r1=191570&r2=191571&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARFContext.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARFContext.cpp Fri Sep 27 17:10:10 2013
@@ -40,22 +40,20 @@ static void dumpPubSection(raw_ostream &
   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";
   }
 }
 





More information about the llvm-commits mailing list