mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-29 14:40:25 +00:00
Dereferencing end() is bad.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15402 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
33c23ddf8a
commit
4ae131e5da
@ -96,7 +96,7 @@ static void ReplaceUsesOfBlockWith(MachineBasicBlock *BB,
|
||||
|
||||
// If BB falls through into Old, insert an unconditional branch to New.
|
||||
MachineFunction::iterator BBSucc = BB; ++BBSucc;
|
||||
if (&*BBSucc == Old)
|
||||
if (BBSucc != BB->getParent()->end() && &*BBSucc == Old)
|
||||
TII.insertGoto(*BB, *New);
|
||||
|
||||
std::vector<MachineBasicBlock*> Succs(BB->succ_begin(), BB->succ_end());
|
||||
|
Loading…
Reference in New Issue
Block a user