OSDN Git Service

[DWARF] Do not create a .debug_ranges section when no ranges are needed.
authorWolfgang Pieb <Wolfgang.Pieb@sony.com>
Tue, 31 Jul 2018 20:56:32 +0000 (20:56 +0000)
committerWolfgang Pieb <Wolfgang.Pieb@sony.com>
Tue, 31 Jul 2018 20:56:32 +0000 (20:56 +0000)
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

lib/CodeGen/AsmPrinter/DwarfDebug.cpp

index 8761fae..e5a457e 100644 (file)
@@ -2136,7 +2136,7 @@ void DwarfDebug::emitDebugRanges() {
     return;
   }
 
-  if (getDwarfVersion() >= 5 && NoRangesPresent())
+  if (NoRangesPresent())
     return;
 
   // Start the dwarf ranges section.