summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-02-25 22:46:44 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-02-25 22:46:44 +0000
commit889b1299a76ae829a6d07135463535b409681585 (patch)
tree1c38cc1f3bc56681ca4727d37ddc6df13a8ae9ea /lib
parent35989a76ac4aed266df17ee37eba4a138ff99f34 (diff)
downloadllvm-889b1299a76ae829a6d07135463535b409681585.tar.gz
llvm-889b1299a76ae829a6d07135463535b409681585.tar.bz2
llvm-889b1299a76ae829a6d07135463535b409681585.tar.xz
DwarfDebug: Avoid emitting an empty debug_aranges section when aranges are disabled
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202201 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index b18e8d49ac..ff5a8213de 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1941,7 +1941,8 @@ void DwarfDebug::emitSectionLabels() {
if (useSplitDwarf())
DwarfAbbrevDWOSectionSym = emitSectionSym(
Asm, TLOF.getDwarfAbbrevDWOSection(), "section_abbrev_dwo");
- emitSectionSym(Asm, TLOF.getDwarfARangesSection());
+ if (GenerateARangeSection)
+ emitSectionSym(Asm, TLOF.getDwarfARangesSection());
DwarfLineSectionSym =
emitSectionSym(Asm, TLOF.getDwarfLineSection(), "section_line");