aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineFunction.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index 60af658..2568448 100644
--- a/llvm/lib/CodeGen/MachineFunction.cpp
+++ b/llvm/lib/CodeGen/MachineFunction.cpp
@@ -967,11 +967,10 @@ void MachineFunction::substituteDebugValuesForInst(const MachineInstr &Old,
// MIR output.
for (unsigned int I = 0; I < Old.getNumOperands(); ++I) {
const auto &OldMO = Old.getOperand(I);
- auto &NewMO = Old.getOperand(I);
if (!OldMO.isReg() || !OldMO.isDef())
continue;
- assert(NewMO.isDef());
+ assert(Old.getOperand(I).isDef());
unsigned NewInstrNum = New.getDebugInstrNum();
makeDebugValueSubstitution(std::make_pair(OldInstrNum, I),