mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
Dereferencing end() is bad.
llvm-svn: 15402
This commit is contained in:
parent
1ca0362e24
commit
786c788d12
@ -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