Fix a copy+pasto. No testcase, because the symptoms of dereferencing

an invalid iterator aren't reproducible.  rdar://10614085.

llvm-svn: 147098
This commit is contained in:
Dan Gohman 2011-12-21 21:43:50 +00:00
parent b952354d58
commit 51c81685a8
1 changed files with 1 additions and 1 deletions

View File

@ -2504,7 +2504,7 @@ ObjCARCOpt::VisitTopDown(BasicBlock *BB,
Pred = *PI++;
if (Pred != BB) {
I = BBStates.find(Pred);
if (I == BBStates.end() || I->second.isVisitedTopDown())
if (I != BBStates.end() && I->second.isVisitedTopDown())
MyStates.MergePred(I->second);
}
}