aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorAdrian Kuegel <akuegel@google.com>2020-10-15 12:48:35 +0200
committerAdrian Kuegel <akuegel@google.com>2020-10-15 12:50:19 +0200
commitead2aa7098cfd693ed1842a88346ba67cfccd7df (patch)
tree9df5ff01714a2880eb21abc65e540fd728212a0d /llvm/lib/CodeGen/MachineFunction.cpp
parentc521e44defb53d38a46f39e29870c628f25d124a (diff)
downloadllvm-ead2aa7098cfd693ed1842a88346ba67cfccd7df.zip
llvm-ead2aa7098cfd693ed1842a88346ba67cfccd7df.tar.gz
llvm-ead2aa7098cfd693ed1842a88346ba67cfccd7df.tar.bz2
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.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),