Fix unused variable warning when compiling with asserts disabled.

Differential Revision: https://reviews.llvm.org/D89454
This commit is contained in:
Adrian Kuegel 2020-10-15 12:48:35 +02:00
parent c521e44def
commit ead2aa7098
1 changed files with 1 additions and 2 deletions

View File

@ -967,11 +967,10 @@ void MachineFunction::substituteDebugValuesForInst(const MachineInstr &Old,
// MIR output. // MIR output.
for (unsigned int I = 0; I < Old.getNumOperands(); ++I) { for (unsigned int I = 0; I < Old.getNumOperands(); ++I) {
const auto &OldMO = Old.getOperand(I); const auto &OldMO = Old.getOperand(I);
auto &NewMO = Old.getOperand(I);
if (!OldMO.isReg() || !OldMO.isDef()) if (!OldMO.isReg() || !OldMO.isDef())
continue; continue;
assert(NewMO.isDef()); assert(Old.getOperand(I).isDef());
unsigned NewInstrNum = New.getDebugInstrNum(); unsigned NewInstrNum = New.getDebugInstrNum();
makeDebugValueSubstitution(std::make_pair(OldInstrNum, I), makeDebugValueSubstitution(std::make_pair(OldInstrNum, I),