diff options
| author | Adrian Kuegel <akuegel@google.com> | 2020-10-15 12:48:35 +0200 |
|---|---|---|
| committer | Adrian Kuegel <akuegel@google.com> | 2020-10-15 12:50:19 +0200 |
| commit | ead2aa7098cfd693ed1842a88346ba67cfccd7df (patch) | |
| tree | 9df5ff01714a2880eb21abc65e540fd728212a0d /llvm/lib/CodeGen/MachineFunction.cpp | |
| parent | c521e44defb53d38a46f39e29870c628f25d124a (diff) | |
Fix unused variable warning when compiling with asserts disabled.
Differential Revision: https://reviews.llvm.org/D89454
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index 60af65834947..2568448f3c92 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), |
