Skip to content

Commit c800b12

Browse files
committed
Reorder section output ordering.
llvm-svn: 168638
1 parent 735401c commit c800b12

File tree

1 file changed

+27
-25
lines changed

1 file changed

+27
-25
lines changed

llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -904,10 +904,34 @@ void DwarfDebug::endModule() {
904904
emitSectionLabels();
905905

906906
// Emit all the DIEs into a debug info section
907-
emitDebugInfo();
907+
if (!useDwarfFission()) {
908+
emitDebugInfo();
908909

909-
// Corresponding abbreviations into a abbrev section.
910-
emitAbbreviations();
910+
// Corresponding abbreviations into a abbrev section.
911+
emitAbbreviations();
912+
913+
// Emit info into a debug loc section.
914+
emitDebugLoc();
915+
916+
// Emit info into a debug aranges section.
917+
emitDebugARanges();
918+
919+
// Emit info into a debug ranges section.
920+
emitDebugRanges();
921+
922+
// Emit info into a debug macinfo section.
923+
emitDebugMacInfo();
924+
925+
// Emit inline info.
926+
// TODO: When we don't need the option anymore we
927+
// can remove all of the code that this section
928+
// depends upon.
929+
if (useDarwinGDBCompat())
930+
emitDebugInlineInfo();
931+
932+
// Emit info into a debug str section.
933+
emitDebugStr();
934+
}
911935

912936
// Emit info into the dwarf accelerator table sections.
913937
if (useDwarfAccelTables()) {
@@ -923,28 +947,6 @@ void DwarfDebug::endModule() {
923947
if (useDarwinGDBCompat())
924948
emitDebugPubTypes();
925949

926-
// Emit info into a debug loc section.
927-
emitDebugLoc();
928-
929-
// Emit info into a debug aranges section.
930-
emitDebugARanges();
931-
932-
// Emit info into a debug ranges section.
933-
emitDebugRanges();
934-
935-
// Emit info into a debug macinfo section.
936-
emitDebugMacInfo();
937-
938-
// Emit inline info.
939-
// TODO: When we don't need the option anymore we
940-
// can remove all of the code that this section
941-
// depends upon.
942-
if (useDarwinGDBCompat())
943-
emitDebugInlineInfo();
944-
945-
// Emit info into a debug str section.
946-
emitDebugStr();
947-
948950
// clean up.
949951
SPMap.clear();
950952
for (DenseMap<const MDNode *, CompileUnit *>::iterator I = CUMap.begin(),

0 commit comments

Comments
 (0)