mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-08 19:46:39 +00:00
Correct a glitch in r194424 which may invalidate iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194457 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c3f4491d91
commit
e26299d76e
@ -2730,7 +2730,9 @@ void GVN::addDeadBlock(BasicBlock *BB) {
|
||||
if (DeadBlocks.count(B))
|
||||
continue;
|
||||
|
||||
for (pred_iterator PI = pred_begin(B), PE = pred_end(B); PI != PE; PI++) {
|
||||
SmallVector<BasicBlock *, 4> Preds(pred_begin(B), pred_end(B));
|
||||
for (SmallVectorImpl<BasicBlock *>::iterator PI = Preds.begin(),
|
||||
PE = Preds.end(); PI != PE; PI++) {
|
||||
BasicBlock *P = *PI;
|
||||
|
||||
if (!DeadBlocks.count(P))
|
||||
|
Loading…
x
Reference in New Issue
Block a user