1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

Use MachineFunction::iterator instead of a MachineBasicBlock* because

FallThrough maybe == to MF.end().

llvm-svn: 15372
This commit is contained in:
Alkis Evlogimenos 2004-07-31 15:03:52 +00:00
parent cdcb1c62e5
commit 143aeb646c

View File

@ -172,8 +172,9 @@ bool BranchFolder::OptimizeBlock(MachineBasicBlock *MBB,
MachineInstr *UncondBr = MI;
MachineFunction::iterator FallThrough = MBB; ++FallThrough;
MachineBasicBlock *UncondDest = MI->getOperand(0).getMachineBasicBlock();
if (UncondDest == &*FallThrough) {
MachineFunction::iterator UncondDest =
MI->getOperand(0).getMachineBasicBlock();
if (UncondDest == FallThrough) {
// Just delete the branch. This does not effect the CFG.
MBB->erase(UncondBr);
return true;