From: Dan Gohman Date: Wed, 21 Dec 2011 21:43:50 +0000 (+0000) Subject: Fix a copy+pasto. No testcase, because the symptoms of dereferencing X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=483716015f436ba0218a097a85cccbe6164f9db9;p=oota-llvm.git Fix a copy+pasto. No testcase, because the symptoms of dereferencing an invalid iterator aren't reproducible. rdar://10614085. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147098 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/ObjCARC.cpp b/lib/Transforms/Scalar/ObjCARC.cpp index 8e9449f5188..b017ba11d82 100644 --- a/lib/Transforms/Scalar/ObjCARC.cpp +++ b/lib/Transforms/Scalar/ObjCARC.cpp @@ -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); } }