Fix an iterator invalidation problem. operator[] on a DenseMap
authorDan Gohman <gohman@apple.com>
Fri, 2 Mar 2012 01:26:46 +0000 (01:26 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 2 Mar 2012 01:26:46 +0000 (01:26 +0000)
commit70e2968866aa09b4c164db77d310f5d43a588227
tree526b588e19e2174a720101d1b87e7b00707d043b
parent22cc4ccc9ea4a45d1f529c1bf48d61a88d3615de
Fix an iterator invalidation problem. operator[] on a DenseMap
can insert a new element, invalidating iterators. Use find
instead, and handle the case where the key is not found explicitly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151871 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/ObjCARC.cpp