diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-08-22 15:37:55 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-08-22 15:37:55 +0000 |
commit | d48bcb2f4dedf8e7b654cb017968b3d7b6663a57 (patch) | |
tree | 62b8921d396e49a8880d11fbf7027832d51982c4 /lib/Sema/SemaObjCProperty.cpp | |
parent | 4bda1d8cfe7d42b2798a06d16a5b776d980aad5f (diff) |
Reduce duplicated hash map lookups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162361 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaObjCProperty.cpp')
-rw-r--r-- | lib/Sema/SemaObjCProperty.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp index e465cd6405..84b609622a 100644 --- a/lib/Sema/SemaObjCProperty.cpp +++ b/lib/Sema/SemaObjCProperty.cpp @@ -1491,8 +1491,8 @@ static void CollectClassPropertyImplementations(ObjCContainerDecl *CDecl, for (ObjCProtocolDecl::prop_iterator P = PDecl->prop_begin(), E = PDecl->prop_end(); P != E; ++P) { ObjCPropertyDecl *Prop = *P; - if (!PropMap.count(Prop->getIdentifier())) - PropMap[Prop->getIdentifier()] = Prop; + // Insert into PropMap if not there already. + PropMap.insert(std::make_pair(Prop->getIdentifier(), Prop)); } // scan through protocol's protocols. for (ObjCProtocolDecl::protocol_iterator PI = PDecl->protocol_begin(), |