1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

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 023a53e89a
commit 0413b3adc6

View File

@ -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),