[objc-arc] Sprinkle some more auto on some iterators.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231447 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Michael Gottesman 2015-03-06 02:10:03 +00:00
parent 18b755804f
commit 517e68fe7b

View File

@ -1479,16 +1479,14 @@ bool ObjCARCOpt::ConnectTDBUTraversals(
for (SmallVectorImpl<Instruction *>::const_iterator for (SmallVectorImpl<Instruction *>::const_iterator
NI = NewRetains.begin(), NE = NewRetains.end(); NI != NE; ++NI) { NI = NewRetains.begin(), NE = NewRetains.end(); NI != NE; ++NI) {
Instruction *NewRetain = *NI; Instruction *NewRetain = *NI;
BlotMapVector<Value *, RRInfo>::const_iterator It = auto It = Retains.find(NewRetain);
Retains.find(NewRetain);
assert(It != Retains.end()); assert(It != Retains.end());
const RRInfo &NewRetainRRI = It->second; const RRInfo &NewRetainRRI = It->second;
KnownSafeTD &= NewRetainRRI.KnownSafe; KnownSafeTD &= NewRetainRRI.KnownSafe;
MultipleOwners = MultipleOwners =
MultipleOwners || MultiOwnersSet.count(GetArgRCIdentityRoot(NewRetain)); MultipleOwners || MultiOwnersSet.count(GetArgRCIdentityRoot(NewRetain));
for (Instruction *NewRetainRelease : NewRetainRRI.Calls) { for (Instruction *NewRetainRelease : NewRetainRRI.Calls) {
DenseMap<Value *, RRInfo>::const_iterator Jt = auto Jt = Releases.find(NewRetainRelease);
Releases.find(NewRetainRelease);
if (Jt == Releases.end()) if (Jt == Releases.end())
return false; return false;
const RRInfo &NewRetainReleaseRRI = Jt->second; const RRInfo &NewRetainReleaseRRI = Jt->second;
@ -1557,15 +1555,13 @@ bool ObjCARCOpt::ConnectTDBUTraversals(
for (SmallVectorImpl<Instruction *>::const_iterator for (SmallVectorImpl<Instruction *>::const_iterator
NI = NewReleases.begin(), NE = NewReleases.end(); NI != NE; ++NI) { NI = NewReleases.begin(), NE = NewReleases.end(); NI != NE; ++NI) {
Instruction *NewRelease = *NI; Instruction *NewRelease = *NI;
DenseMap<Value *, RRInfo>::const_iterator It = auto It = Releases.find(NewRelease);
Releases.find(NewRelease);
assert(It != Releases.end()); assert(It != Releases.end());
const RRInfo &NewReleaseRRI = It->second; const RRInfo &NewReleaseRRI = It->second;
KnownSafeBU &= NewReleaseRRI.KnownSafe; KnownSafeBU &= NewReleaseRRI.KnownSafe;
CFGHazardAfflicted |= NewReleaseRRI.CFGHazardAfflicted; CFGHazardAfflicted |= NewReleaseRRI.CFGHazardAfflicted;
for (Instruction *NewReleaseRetain : NewReleaseRRI.Calls) { for (Instruction *NewReleaseRetain : NewReleaseRRI.Calls) {
BlotMapVector<Value *, RRInfo>::const_iterator Jt = auto Jt = Retains.find(NewReleaseRetain);
Retains.find(NewReleaseRetain);
if (Jt == Retains.end()) if (Jt == Retains.end())
return false; return false;
const RRInfo &NewReleaseRetainRRI = Jt->second; const RRInfo &NewReleaseRetainRRI = Jt->second;