Move section label emission to module end. Nothing should be
depending on them being emitted before the text and/or data
sections and testing didn't uncover any.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168321 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 742a779..aa10539 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -791,9 +791,6 @@
// Tell MMI that we have debug info.
MMI->setDebugInfoAvailability(true);
- // Emit initial sections.
- EmitSectionLabels();
-
// Prime section data.
SectionMap.insert(Asm->getObjFileLowering().getTextSection());
}
@@ -876,6 +873,9 @@
// Compute DIE offsets and sizes.
computeSizeAndOffsets();
+ // Emit initial sections.
+ EmitSectionLabels();
+
// Emit all the DIEs into a debug info section
emitDebugInfo();