Do not walk invalid iterator.

llvm-svn: 42812
This commit is contained in:
Devang Patel 2007-10-09 21:31:36 +00:00
parent 152f18f671
commit 2af23f976b
1 changed files with 2 additions and 2 deletions

View File

@ -632,8 +632,8 @@ void LoopUnswitch::ReplaceLoopExternalDFMember(Loop *L, BasicBlock *BB,
DominanceFrontier::DomSetType &DFSet = DFI->second;
for (DominanceFrontier::DomSetType::iterator DI = DFSet.begin(),
DE = DFSet.end(); DI != DE; ++DI) {
BasicBlock *B = *DI;
DE = DFSet.end(); DI != DE;) {
BasicBlock *B = *DI++;
if (L->contains(B))
continue;