diff options
author | Chris Lattner <sabre@nondot.org> | 2004-03-31 21:59:29 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-03-31 21:59:29 +0000 |
commit | acccf32aa3e5485aa6b92d419859faa0a07c15d3 (patch) | |
tree | dd10636c70187650ecf6f6c2557e38cc5daa03f6 /llvm/lib/CodeGen/PHIElimination.cpp | |
parent | 7c92c296baad713fd72ce2965e1fede9c15997c6 (diff) | |
download | bcm5719-llvm-acccf32aa3e5485aa6b92d419859faa0a07c15d3.tar.gz bcm5719-llvm-acccf32aa3e5485aa6b92d419859faa0a07c15d3.zip |
MachineBasicBlock::remove should not modify the iterator passed in
llvm-svn: 12571
Diffstat (limited to 'llvm/lib/CodeGen/PHIElimination.cpp')
-rw-r--r-- | llvm/lib/CodeGen/PHIElimination.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/PHIElimination.cpp b/llvm/lib/CodeGen/PHIElimination.cpp index 181fe469a13..324f4c4e853 100644 --- a/llvm/lib/CodeGen/PHIElimination.cpp +++ b/llvm/lib/CodeGen/PHIElimination.cpp @@ -71,8 +71,7 @@ bool PNE::EliminatePHINodes(MachineFunction &MF, MachineBasicBlock &MBB) { while (MBB.front().getOpcode() == TargetInstrInfo::PHI) { // Unlink the PHI node from the basic block... but don't delete the PHI yet - MachineBasicBlock::iterator begin = MBB.begin(); - MachineInstr *MI = MBB.remove(begin); + MachineInstr *MI = MBB.remove(MBB.begin()); assert(MRegisterInfo::isVirtualRegister(MI->getOperand(0).getReg()) && "PHI node doesn't write virt reg?"); |