forked from OSchip/llvm-project
DebugInfo: Reduce the scope of some variables related to debug_ranges emission
Minor tidy up/NFC llvm-svn: 374613
This commit is contained in:
parent
cde860a1c9
commit
de9aa37bf0
|
@ -467,14 +467,6 @@ void DwarfCompileUnit::constructScopeDIE(
|
|||
|
||||
void DwarfCompileUnit::addScopeRangeList(DIE &ScopeDIE,
|
||||
SmallVector<RangeSpan, 2> Range) {
|
||||
const TargetLoweringObjectFile &TLOF = Asm->getObjFileLowering();
|
||||
|
||||
// Emit the offset into .debug_ranges or .debug_rnglists as a relocatable
|
||||
// label. emitDIE() will handle emitting it appropriately.
|
||||
const MCSymbol *RangeSectionSym =
|
||||
DD->getDwarfVersion() >= 5
|
||||
? TLOF.getDwarfRnglistsSection()->getBeginSymbol()
|
||||
: TLOF.getDwarfRangesSection()->getBeginSymbol();
|
||||
|
||||
HasRangeLists = true;
|
||||
|
||||
|
@ -493,12 +485,17 @@ void DwarfCompileUnit::addScopeRangeList(DIE &ScopeDIE,
|
|||
// (DW_RLE_startx_endx etc.).
|
||||
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
|
||||
addSectionLabel(ScopeDIE, dwarf::DW_AT_ranges, List.getSym(),
|
||||
RangeSectionSym);
|
||||
else {
|
||||
const TargetLoweringObjectFile &TLOF = Asm->getObjFileLowering();
|
||||
const MCSymbol *RangeSectionSym =
|
||||
TLOF.getDwarfRangesSection()->getBeginSymbol();
|
||||
if (isDwoUnit())
|
||||
addSectionDelta(ScopeDIE, dwarf::DW_AT_ranges, List.getSym(),
|
||||
RangeSectionSym);
|
||||
else
|
||||
addSectionLabel(ScopeDIE, dwarf::DW_AT_ranges, List.getSym(),
|
||||
RangeSectionSym);
|
||||
}
|
||||
}
|
||||
|
||||
void DwarfCompileUnit::attachRangesOrLowHighPC(
|
||||
|
|
Loading…
Reference in New Issue