summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.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/DwarfDebug.cpp
parent83443c9a9ec76e55a052854bfacdbb40d2eb6a72 (diff)
downloadbcm5719-llvm-3739979c2031ebcf0ed40d30d549cf82bb1a122c.tar.gz
bcm5719-llvm-3739979c2031ebcf0ed40d30d549cf82bb1a122c.zip
[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/DwarfDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 224365e6559..1547822b695 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1123,8 +1123,8 @@ DwarfDebug::buildLocationList(SmallVectorImpl<DebugLocEntry> &DebugLoc,
SmallVector<DebugLocEntry::Value, 4> OpenRanges;
for (auto I = Ranges.begin(), E = Ranges.end(); I != E; ++I) {
- const MachineInstr *Begin = I->first;
- const MachineInstr *End = I->second;
+ const MachineInstr *Begin = I->getBegin();
+ const MachineInstr *End = I->getEnd();
assert(Begin->isDebugValue() && "Invalid History entry");
// Check if a variable is inaccessible in this range.
@@ -1150,7 +1150,7 @@ DwarfDebug::buildLocationList(SmallVectorImpl<DebugLocEntry> &DebugLoc,
else if (std::next(I) == Ranges.end())
EndLabel = Asm->getFunctionEnd();
else
- EndLabel = getLabelBeforeInsn(std::next(I)->first);
+ EndLabel = getLabelBeforeInsn(std::next(I)->getBegin());
assert(EndLabel && "Forgot label after instruction ending a range!");
LLVM_DEBUG(dbgs() << "DotDebugLoc: " << *Begin << "\n");
@@ -1293,12 +1293,12 @@ void DwarfDebug::collectEntityInfo(DwarfCompileUnit &TheCU,
DbgVariable *RegVar = cast<DbgVariable>(createConcreteEntity(TheCU,
*Scope, LocalVar, IV.second));
- const MachineInstr *MInsn = Ranges.front().first;
+ const MachineInstr *MInsn = Ranges.front().getBegin();
assert(MInsn->isDebugValue() && "History must begin with debug value");
// Check if there is a single DBG_VALUE, valid throughout the var's scope.
if (Ranges.size() == 1 &&
- validThroughout(LScopes, MInsn, Ranges.front().second)) {
+ validThroughout(LScopes, MInsn, Ranges.front().getEnd())) {
RegVar->initializeDbgValue(MInsn);
continue;
}
OpenPOWER on IntegriCloud