summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2019-10-02 22:27:24 +0000
committerDavid Blaikie <dblaikie@gmail.com>2019-10-02 22:27:24 +0000
commitb677cb8dc74d2c409214833c27d37a4bda001f37 (patch)
tree4c6696730ef27dec2115dd6c5dfb21bf8d99ede1 /llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
parent4d39410b1e0896f7b39be15b42de35b96faaee6c (diff)
downloadbcm5719-llvm-b677cb8dc74d2c409214833c27d37a4bda001f37.tar.gz
bcm5719-llvm-b677cb8dc74d2c409214833c27d37a4bda001f37.zip
DebugInfo: Simplify RangeSpan to be a plain struct
This is an effort to make RangeSpan and DebugLocStream::Entry more similar to share code for their emission (to reuse the more complicated code for using (& choosing when to use) base address selection entries, etc). It didn't seem like this struct was worth the complexity of encapsulation - when the members could be initialized by the ctor to any value (no validation) and the type is assignable (so there's no mutability or other constraint being implemented by its interface). llvm-svn: 373533
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index c1c5c4f010c..69c4d3fb5b4 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -326,13 +326,13 @@ void DwarfCompileUnit::addRange(RangeSpan Range) {
// 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() {
@@ -506,7 +506,7 @@ void DwarfCompileUnit::attachRangesOrLowHighPC(
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));
}
@@ -516,8 +516,8 @@ void DwarfCompileUnit::attachRangesOrLowHighPC(
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));
}
OpenPOWER on IntegriCloud