aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2018-10-20 08:12:36 +0000
committerDavid Blaikie <dblaikie@gmail.com>2018-10-20 08:12:36 +0000
commit32e09de91c216facfe782d0a4691a17b5500ace6 (patch)
tree0e1788fba5b513a74d5fd220f458eacde41e0309 /llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
parentc4af8bf29fe0f413229f67909cfeb0a427afcd67 (diff)
downloadllvm-32e09de91c216facfe782d0a4691a17b5500ace6.zip
llvm-32e09de91c216facfe782d0a4691a17b5500ace6.tar.gz
llvm-32e09de91c216facfe782d0a4691a17b5500ace6.tar.bz2
DebugInfo: Implement debug_rnglists.dwo
Save space/relocations in .o files by keeping dwo ranges in the dwo file rather than the .o file. llvm-svn: 344837
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index f638087..81eb0c2 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -440,11 +440,11 @@ void DwarfCompileUnit::addScopeRangeList(DIE &ScopeDIE,
// FIXME: For DWARF v5, do not generate the DW_AT_ranges attribute under
// fission until we support the forms using the .debug_addr section
// (DW_RLE_startx_endx etc.).
- if (isDwoUnit())
+ if (DD->getDwarfVersion() >= 5)
+ addUInt(ScopeDIE, dwarf::DW_AT_ranges, dwarf::DW_FORM_rnglistx, Index);
+ else if (isDwoUnit())
addSectionDelta(ScopeDIE, dwarf::DW_AT_ranges, List.getSym(),
RangeSectionSym);
- else if (DD->getDwarfVersion() >= 5)
- addUInt(ScopeDIE, dwarf::DW_AT_ranges, dwarf::DW_FORM_rnglistx, Index);
else
addSectionLabel(ScopeDIE, dwarf::DW_AT_ranges, List.getSym(),
RangeSectionSym);