aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MIRPrinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/MIRPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/MIRPrinter.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp
index 4b2fdfb..8326d83 100644
--- a/llvm/lib/CodeGen/MIRPrinter.cpp
+++ b/llvm/lib/CodeGen/MIRPrinter.cpp
@@ -491,17 +491,17 @@ void MIRPrinter::convertStackObjects(yaml::MachineFunction &YMF,
// Print the debug variable information.
for (const MachineFunction::VariableDbgInfo &DebugVar :
- MF.getVariableDbgInfo()) {
- assert(DebugVar.Slot >= MFI.getObjectIndexBegin() &&
- DebugVar.Slot < MFI.getObjectIndexEnd() &&
+ MF.getInStackSlotVariableDbgInfo()) {
+ int Idx = DebugVar.getStackSlot();
+ assert(Idx >= MFI.getObjectIndexBegin() && Idx < MFI.getObjectIndexEnd() &&
"Invalid stack object index");
- if (DebugVar.Slot < 0) { // Negative index means fixed objects.
+ if (Idx < 0) { // Negative index means fixed objects.
auto &Object =
- YMF.FixedStackObjects[FixedStackObjectsIdx[DebugVar.Slot +
+ YMF.FixedStackObjects[FixedStackObjectsIdx[Idx +
MFI.getNumFixedObjects()]];
printStackObjectDbgInfo(DebugVar, Object, MST);
} else {
- auto &Object = YMF.StackObjects[StackObjectsIdx[DebugVar.Slot]];
+ auto &Object = YMF.StackObjects[StackObjectsIdx[Idx]];
printStackObjectDbgInfo(DebugVar, Object, MST);
}
}