addRangeList(std::move(List));
}
+void DwarfCompileUnit::attachRangesOrLowHighPC(
+ DIE &Die, const SmallVectorImpl<InsnRange> &Ranges) {
+ assert(!Ranges.empty());
+ if (Ranges.size() == 1)
+ attachLowHighPC(Die, DD->getLabelBeforeInsn(Ranges.front().first),
+ DD->getLabelAfterInsn(Ranges.front().second));
+ else
+ addScopeRangeList(Die, Ranges);
+}
+
} // end llvm namespace
return !getLabelAfterInsn(Ranges.front().second);
}
-void DwarfDebug::attachRangesOrLowHighPC(DwarfCompileUnit &TheCU, DIE &Die,
- const SmallVectorImpl<InsnRange> &Ranges) {
- assert(!Ranges.empty());
- if (Ranges.size() == 1)
- TheCU.attachLowHighPC(Die, getLabelBeforeInsn(Ranges.front().first),
- getLabelAfterInsn(Ranges.front().second));
- else
- TheCU.addScopeRangeList(Die, Ranges);
-}
-
// Construct new DW_TAG_lexical_block for this scope and attach
// DW_AT_low_pc/DW_AT_high_pc labels.
std::unique_ptr<DIE>
if (Scope->isAbstractScope())
return ScopeDIE;
- attachRangesOrLowHighPC(TheCU, *ScopeDIE, Scope->getRanges());
+ TheCU.attachRangesOrLowHighPC(*ScopeDIE, Scope->getRanges());
return ScopeDIE;
}
auto ScopeDIE = make_unique<DIE>(dwarf::DW_TAG_inlined_subroutine);
TheCU.addDIEEntry(*ScopeDIE, dwarf::DW_AT_abstract_origin, *OriginDIE);
- attachRangesOrLowHighPC(TheCU, *ScopeDIE, Scope->getRanges());
+ TheCU.attachRangesOrLowHighPC(*ScopeDIE, Scope->getRanges());
// Add the call site information to the DIE.
DILocation DL(Scope->getInlinedAt());
LabelsAfterInsn.insert(std::make_pair(MI, nullptr));
}
- void attachRangesOrLowHighPC(DwarfCompileUnit &Unit, DIE &D,
- const SmallVectorImpl<InsnRange> &Ranges);
-
public:
//===--------------------------------------------------------------------===//
// Main entry points.