aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
diff options
context:
space:
mode:
authorDavid Stenberg <david.stenberg@ericsson.com>2019-04-10 09:07:32 +0000
committerDavid Stenberg <david.stenberg@ericsson.com>2019-04-10 09:07:32 +0000
commit3739979c2031ebcf0ed40d30d549cf82bb1a122c (patch)
tree7e37c9a2fec093fe136059a9b71c368b16b59b63 /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
parent83443c9a9ec76e55a052854bfacdbb40d2eb6a72 (diff)
downloadllvm-3739979c2031ebcf0ed40d30d549cf82bb1a122c.zip
llvm-3739979c2031ebcf0ed40d30d549cf82bb1a122c.tar.gz
llvm-3739979c2031ebcf0ed40d30d549cf82bb1a122c.tar.bz2
[DebugInfo] Make InstrRange into a class, NFC
Summary: Replace use of std::pair by creating a class for the debug value instruction ranges instead. This is a preparatory refactoring for improving handling of clobbered fragments. In an upcoming commit the Begin pointer will become a PointerIntPair, so it will be cleaner to have a getter for that. Reviewers: aprantl Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59938 llvm-svn: 358059
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
index a57f0f5..b91f40d 100644
--- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
@@ -1159,8 +1159,8 @@ void CodeViewDebug::calculateRanges(
// Calculate the definition ranges.
for (auto I = Ranges.begin(), E = Ranges.end(); I != E; ++I) {
- const InsnRange &Range = *I;
- const MachineInstr *DVInst = Range.first;
+ const auto &Range = *I;
+ const MachineInstr *DVInst = Range.getBegin();
assert(DVInst->isDebugValue() && "Invalid History entry");
// FIXME: Find a way to represent constant variables, since they are
// relatively common.
@@ -1215,18 +1215,18 @@ void CodeViewDebug::calculateRanges(
}
// Compute the label range.
- const MCSymbol *Begin = getLabelBeforeInsn(Range.first);
- const MCSymbol *End = getLabelAfterInsn(Range.second);
+ const MCSymbol *Begin = getLabelBeforeInsn(Range.getBegin());
+ const MCSymbol *End = getLabelAfterInsn(Range.getEnd());
if (!End) {
// This range is valid until the next overlapping bitpiece. In the
// common case, ranges will not be bitpieces, so they will overlap.
auto J = std::next(I);
const DIExpression *DIExpr = DVInst->getDebugExpression();
while (J != E &&
- !DIExpr->fragmentsOverlap(J->first->getDebugExpression()))
+ !DIExpr->fragmentsOverlap(J->getBegin()->getDebugExpression()))
++J;
if (J != E)
- End = getLabelBeforeInsn(J->first);
+ End = getLabelBeforeInsn(J->getBegin());
else
End = Asm->getFunctionEnd();
}