@@ -904,10 +904,34 @@ void DwarfDebug::endModule() {
904
904
emitSectionLabels ();
905
905
906
906
// Emit all the DIEs into a debug info section
907
- emitDebugInfo ();
907
+ if (!useDwarfFission ()) {
908
+ emitDebugInfo ();
908
909
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
+ }
911
935
912
936
// Emit info into the dwarf accelerator table sections.
913
937
if (useDwarfAccelTables ()) {
@@ -923,28 +947,6 @@ void DwarfDebug::endModule() {
923
947
if (useDarwinGDBCompat ())
924
948
emitDebugPubTypes ();
925
949
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
-
948
950
// clean up.
949
951
SPMap.clear ();
950
952
for (DenseMap<const MDNode *, CompileUnit *>::iterator I = CUMap.begin (),
0 commit comments