[DWARF] Do not create a .debug_ranges section when no ranges are needed.

Reviewers: aprantl

Differential Revision: https://reviews.llvm.org/D50089

llvm-svn: 338437
This commit is contained in:
Wolfgang Pieb 2018-07-31 20:56:32 +00:00
parent a657a32cc8
commit baf94f830b

View File

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