From: Wolfgang Pieb Date: Tue, 31 Jul 2018 20:56:32 +0000 (+0000) Subject: [DWARF] Do not create a .debug_ranges section when no ranges are needed. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7cef9e8fc8a0bf8d82123494301592364c6d7ed3;p=llvm [DWARF] Do not create a .debug_ranges section when no ranges are needed. Reviewers: aprantl Differential Revision: https://reviews.llvm.org/D50089 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338437 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 8761fae9dd2..e5a457e424b 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2136,7 +2136,7 @@ void DwarfDebug::emitDebugRanges() { return; } - if (getDwarfVersion() >= 5 && NoRangesPresent()) + if (NoRangesPresent()) return; // Start the dwarf ranges section.