Reorder section output ordering.
authorEric Christopher <echristo@gmail.com>
Tue, 27 Nov 2012 00:13:58 +0000 (00:13 +0000)
committerEric Christopher <echristo@gmail.com>
Tue, 27 Nov 2012 00:13:58 +0000 (00:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168638 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfDebug.cpp

index 97f61e86101c8ef61878dc7b57d1caf9d3f7515b..d7733846d1e31400c13e4e627ad7377340d74c53 100644 (file)
@@ -904,10 +904,34 @@ void DwarfDebug::endModule() {
   emitSectionLabels();
 
   // Emit all the DIEs into a debug info section
-  emitDebugInfo();
+  if (!useDwarfFission()) {
+    emitDebugInfo();
 
-  // Corresponding abbreviations into a abbrev section.
-  emitAbbreviations();
+    // Corresponding abbreviations into a abbrev section.
+    emitAbbreviations();
+
+    // Emit info into a debug loc section.
+    emitDebugLoc();
+
+    // Emit info into a debug aranges section.
+    emitDebugARanges();
+
+    // Emit info into a debug ranges section.
+    emitDebugRanges();
+
+    // Emit info into a debug macinfo section.
+    emitDebugMacInfo();
+
+    // Emit inline info.
+    // TODO: When we don't need the option anymore we
+    // can remove all of the code that this section
+    // depends upon.
+    if (useDarwinGDBCompat())
+      emitDebugInlineInfo();
+
+    // Emit info into a debug str section.
+    emitDebugStr();
+  }
 
   // Emit info into the dwarf accelerator table sections.
   if (useDwarfAccelTables()) {
@@ -923,28 +947,6 @@ void DwarfDebug::endModule() {
   if (useDarwinGDBCompat())
     emitDebugPubTypes();
 
-  // Emit info into a debug loc section.
-  emitDebugLoc();
-
-  // Emit info into a debug aranges section.
-  emitDebugARanges();
-
-  // Emit info into a debug ranges section.
-  emitDebugRanges();
-
-  // Emit info into a debug macinfo section.
-  emitDebugMacInfo();
-
-  // Emit inline info.
-  // TODO: When we don't need the option anymore we
-  // can remove all of the code that this section
-  // depends upon.
-  if (useDarwinGDBCompat())
-    emitDebugInlineInfo();
-
-  // Emit info into a debug str section.
-  emitDebugStr();
-
   // clean up.
   SPMap.clear();
   for (DenseMap<const MDNode *, CompileUnit *>::iterator I = CUMap.begin(),