// emitted into and the subprogram was contained within. If these are the
// same then extend our current range, otherwise add this as a new range.
if (CURanges.empty() || !SameAsPrevCU ||
- (&CURanges.back().getEnd()->getSection() !=
- &Range.getEnd()->getSection())) {
+ (&CURanges.back().End->getSection() !=
+ &Range.End->getSection())) {
CURanges.push_back(Range);
return;
}
- CURanges.back().setEnd(Range.getEnd());
+ CURanges.back().End = Range.End;
}
void DwarfCompileUnit::initStmtList() {
if (Ranges.size() == 1 || !DD->useRangesSection()) {
const RangeSpan &Front = Ranges.front();
const RangeSpan &Back = Ranges.back();
- attachLowHighPC(Die, Front.getStart(), Back.getEnd());
+ attachLowHighPC(Die, Front.Begin, Back.End);
} else
addScopeRangeList(Die, std::move(Ranges));
}
SmallVector<RangeSpan, 2> List;
List.reserve(Ranges.size());
for (const InsnRange &R : Ranges)
- List.push_back(RangeSpan(DD->getLabelBeforeInsn(R.first),
- DD->getLabelAfterInsn(R.second)));
+ List.push_back(
+ {DD->getLabelBeforeInsn(R.first), DD->getLabelAfterInsn(R.second)});
attachRangesOrLowHighPC(Die, std::move(List));
}
// 2.17.3).
U.addUInt(U.getUnitDie(), dwarf::DW_AT_low_pc, dwarf::DW_FORM_addr, 0);
else
- U.setBaseAddress(TheCU.getRanges().front().getStart());
+ U.setBaseAddress(TheCU.getRanges().front().Begin);
U.attachRangesOrLowHighPC(U.getUnitDie(), TheCU.takeRanges());
}
collectEntityInfo(TheCU, SP, Processed);
// Add the range of this function to the list of ranges for the CU.
- TheCU.addRange(RangeSpan(Asm->getFunctionBegin(), Asm->getFunctionEnd()));
+ TheCU.addRange({Asm->getFunctionBegin(), Asm->getFunctionEnd()});
// Under -gmlt, skip building the subprogram if there are no inlined
// subroutines inside it. But with -fdebug-info-for-profiling, the subprogram
auto Size = Asm->MAI->getCodePointerSize();
for (const RangeSpan &Range : List.getRanges())
- SectionRanges[&Range.getStart()->getSection()].push_back(&Range);
+ SectionRanges[&Range.Begin->getSection()].push_back(&Range);
const DwarfCompileUnit &CU = List.getCU();
const MCSymbol *CUBase = CU.getBaseAddress();
if (!Base && (P.second.size() > 1 || DwarfVersion < 5) &&
(CU.getCUNode()->getRangesBaseAddress() || DwarfVersion >= 5)) {
BaseIsSet = true;
- Base = DD.getSectionLabel(&P.second.front()->getStart()->getSection());
+ Base = DD.getSectionLabel(&P.second.front()->Begin->getSection());
if (DwarfVersion >= 5) {
Asm->OutStreamer->AddComment("DW_RLE_base_addressx");
Asm->OutStreamer->EmitIntValue(dwarf::DW_RLE_base_addressx, 1);
}
for (const auto *RS : P.second) {
- const MCSymbol *Begin = RS->getStart();
- const MCSymbol *End = RS->getEnd();
+ const MCSymbol *Begin = RS->Begin;
+ const MCSymbol *End = RS->End;
assert(Begin && "Range without a begin symbol?");
assert(End && "Range without an end symbol?");
if (Base) {
class MCSection;
// Data structure to hold a range for range lists.
-class RangeSpan {
-public:
- RangeSpan(MCSymbol *S, MCSymbol *E) : Start(S), End(E) {}
- const MCSymbol *getStart() const { return Start; }
- const MCSymbol *getEnd() const { return End; }
- void setEnd(const MCSymbol *E) { End = E; }
-
-private:
- const MCSymbol *Start, *End;
+struct RangeSpan {
+ const MCSymbol *Begin;
+ const MCSymbol *End;
};
class RangeSpanList {