summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-11-19 09:04:50 +0000
committerEric Christopher <echristo@gmail.com>2013-11-19 09:04:50 +0000
commit9a8f5eddad6b2fb23a17c61d16b831f568769658 (patch)
tree38615dc106b320305c259394a7936fad6a9515b5
parentb4bef6d2540119763bca6af7e7b2c9876a579856 (diff)
downloadbcm5719-llvm-9a8f5eddad6b2fb23a17c61d16b831f568769658.tar.gz
bcm5719-llvm-9a8f5eddad6b2fb23a17c61d16b831f568769658.zip
Refactor the section emission code to remove duplicates now that
we can emit various sections in any order. No functional change. llvm-svn: 195120
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp54
1 files changed, 15 insertions, 39 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 81d7e249efa..9c75373765a 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1165,54 +1165,30 @@ void DwarfDebug::endModule() {
// Finalize the debug info for the module.
finalizeModuleInfo();
- if (!useSplitDwarf()) {
- emitDebugStr();
+ emitDebugStr();
- // Emit all the DIEs into a debug info section.
- emitDebugInfo();
+ // Emit all the DIEs into a debug info section.
+ 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 loc section.
+ emitDebugLoc();
- // Emit info into a debug aranges section.
- emitDebugARanges();
+ // Emit info into a debug aranges section.
+ emitDebugARanges();
- // Emit info into a debug ranges section.
- emitDebugRanges();
+ // Emit info into a debug ranges section.
+ emitDebugRanges();
- // Emit info into a debug macinfo section.
- emitDebugMacInfo();
+ // Emit info into a debug macinfo section.
+ emitDebugMacInfo();
- } else {
- // TODO: Fill this in for separated debug sections and separate
- // out information into new sections.
- emitDebugStr();
- if (useSplitDwarf())
- emitDebugStrDWO();
-
- // Emit the debug info section and compile units.
- emitDebugInfo();
+ if (useSplitDwarf()) {
+ emitDebugStrDWO();
emitDebugInfoDWO();
-
- // Corresponding abbreviations into a abbrev section.
- emitAbbreviations();
emitDebugAbbrevDWO();
-
- // 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 DWO addresses.
InfoHolder.emitAddresses(Asm->getObjFileLowering().getDwarfAddrSection());
}
OpenPOWER on IntegriCloud