diff --git a/lib/CodeGen/UnreachableBlockElim.cpp b/lib/CodeGen/UnreachableBlockElim.cpp index 8c9631e435b..39aa1e4919a 100644 --- a/lib/CodeGen/UnreachableBlockElim.cpp +++ b/lib/CodeGen/UnreachableBlockElim.cpp @@ -184,9 +184,7 @@ bool UnreachableMachineBlockElim::runOnMachineFunction(MachineFunction &F) { unsigned Input = phi->getOperand(1).getReg(); unsigned Output = phi->getOperand(0).getReg(); - MachineInstr* temp = phi; - ++phi; - temp->eraseFromParent(); + phi++->eraseFromParent(); ModifiedPHI = true; if (Input != Output) {