mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-09 10:31:14 +00:00
Forgot to check for if iterator reached the end.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37420 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
111354ff99
commit
3ec425470f
@ -441,8 +441,9 @@ bool IfConverter::AnalyzeBlocks(MachineFunction &MF,
|
||||
/// isNextBlock - Returns true either if ToBB the next block after BB or
|
||||
/// that all the intervening blocks are empty.
|
||||
static bool isNextBlock(MachineBasicBlock *BB, MachineBasicBlock *ToBB) {
|
||||
MachineFunction *MF = BB->getParent();
|
||||
MachineFunction::iterator I = BB;
|
||||
while (++I != MachineFunction::iterator(ToBB))
|
||||
while (++I != MF->end() && I != MachineFunction::iterator(ToBB))
|
||||
if (!I->empty())
|
||||
return false;
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user