diff options
author | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-07-31 15:03:52 +0000 |
---|---|---|
committer | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-07-31 15:03:52 +0000 |
commit | dd0458378128b748d4ac6c6035cd47d021faf507 (patch) | |
tree | 38dd78a4348785baf2a283ba55ca2908033d7e5d /lib | |
parent | 31e155e610d6f506c64185bfa35c0b7ff729e025 (diff) | |
download | external_llvm-dd0458378128b748d4ac6c6035cd47d021faf507.zip external_llvm-dd0458378128b748d4ac6c6035cd47d021faf507.tar.gz external_llvm-dd0458378128b748d4ac6c6035cd47d021faf507.tar.bz2 |
Use MachineFunction::iterator instead of a MachineBasicBlock* because
FallThrough maybe == to MF.end().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15372 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/BranchFolding.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/BranchFolding.cpp b/lib/CodeGen/BranchFolding.cpp index 980852e..b510375 100644 --- a/lib/CodeGen/BranchFolding.cpp +++ b/lib/CodeGen/BranchFolding.cpp @@ -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; |