diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-05-27 13:28:52 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-05-27 13:28:52 +0000 |
commit | 811bfcd823d51db6a06b3fd5a5943ff910b79d68 (patch) | |
tree | ce3e348b4131ea850d6f179b01a35cc731da4f95 /lib/Sema | |
parent | 28b230723d5daf3c48c2e134f4b5626bd69392c8 (diff) |
Use the SelectorSet typedef more widely throughout Sema.
While there make it a SmallPtrSet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157532 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 22 | ||||
-rw-r--r-- | lib/Sema/SemaObjCProperty.cpp | 2 |
2 files changed, 12 insertions, 12 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 9e640b4540..3bcc8ce650 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -1491,8 +1491,8 @@ void Sema::WarnExactTypedMethods(ObjCMethodDecl *ImpMethodDecl, void Sema::CheckProtocolMethodDefs(SourceLocation ImpLoc, ObjCProtocolDecl *PDecl, bool& IncompleteImpl, - const llvm::DenseSet<Selector> &InsMap, - const llvm::DenseSet<Selector> &ClsMap, + const SelectorSet &InsMap, + const SelectorSet &ClsMap, ObjCContainerDecl *CDecl) { ObjCCategoryDecl *C = dyn_cast<ObjCCategoryDecl>(CDecl); ObjCInterfaceDecl *IDecl = C ? C->getClassInterface() @@ -1588,10 +1588,10 @@ void Sema::CheckProtocolMethodDefs(SourceLocation ImpLoc, /// MatchAllMethodDeclarations - Check methods declared in interface /// or protocol against those declared in their implementations. /// -void Sema::MatchAllMethodDeclarations(const llvm::DenseSet<Selector> &InsMap, - const llvm::DenseSet<Selector> &ClsMap, - llvm::DenseSet<Selector> &InsMapSeen, - llvm::DenseSet<Selector> &ClsMapSeen, +void Sema::MatchAllMethodDeclarations(const SelectorSet &InsMap, + const SelectorSet &ClsMap, + SelectorSet &InsMapSeen, + SelectorSet &ClsMapSeen, ObjCImplDecl* IMPDecl, ObjCContainerDecl* CDecl, bool &IncompleteImpl, @@ -1687,7 +1687,7 @@ void Sema::MatchAllMethodDeclarations(const llvm::DenseSet<Selector> &InsMap, /// warns each time an exact match is found. void Sema::CheckCategoryVsClassMethodMatches( ObjCCategoryImplDecl *CatIMPDecl) { - llvm::DenseSet<Selector> InsMap, ClsMap; + SelectorSet InsMap, ClsMap; for (ObjCImplementationDecl::instmeth_iterator I = CatIMPDecl->instmeth_begin(), @@ -1708,7 +1708,7 @@ void Sema::CheckCategoryVsClassMethodMatches( ObjCInterfaceDecl *IDecl = CatDecl->getClassInterface(); if (!IDecl) return; - llvm::DenseSet<Selector> InsMapSeen, ClsMapSeen; + SelectorSet InsMapSeen, ClsMapSeen; bool IncompleteImpl = false; MatchAllMethodDeclarations(InsMap, ClsMap, InsMapSeen, ClsMapSeen, CatIMPDecl, IDecl, @@ -1719,7 +1719,7 @@ void Sema::CheckCategoryVsClassMethodMatches( void Sema::ImplMethodsVsClassMethods(Scope *S, ObjCImplDecl* IMPDecl, ObjCContainerDecl* CDecl, bool IncompleteImpl) { - llvm::DenseSet<Selector> InsMap; + SelectorSet InsMap; // Check and see if instance methods in class interface have been // implemented in the implementation class. for (ObjCImplementationDecl::instmeth_iterator @@ -1734,7 +1734,7 @@ void Sema::ImplMethodsVsClassMethods(Scope *S, ObjCImplDecl* IMPDecl, IDecl->isObjCRequiresPropertyDefs()) DiagnoseUnimplementedProperties(S, IMPDecl, CDecl, InsMap); - llvm::DenseSet<Selector> ClsMap; + SelectorSet ClsMap; for (ObjCImplementationDecl::classmeth_iterator I = IMPDecl->classmeth_begin(), E = IMPDecl->classmeth_end(); I != E; ++I) @@ -1742,7 +1742,7 @@ void Sema::ImplMethodsVsClassMethods(Scope *S, ObjCImplDecl* IMPDecl, // Check for type conflict of methods declared in a class/protocol and // its implementation; if any. - llvm::DenseSet<Selector> InsMapSeen, ClsMapSeen; + SelectorSet InsMapSeen, ClsMapSeen; MatchAllMethodDeclarations(InsMap, ClsMap, InsMapSeen, ClsMapSeen, IMPDecl, CDecl, IncompleteImpl, true); diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp index 222eaac7f0..88de7d315e 100644 --- a/lib/Sema/SemaObjCProperty.cpp +++ b/lib/Sema/SemaObjCProperty.cpp @@ -1523,7 +1523,7 @@ void Sema::DefaultSynthesizeProperties(Scope *S, Decl *D) { void Sema::DiagnoseUnimplementedProperties(Scope *S, ObjCImplDecl* IMPDecl, ObjCContainerDecl *CDecl, - const llvm::DenseSet<Selector>& InsMap) { + const SelectorSet &InsMap) { llvm::DenseMap<IdentifierInfo *, ObjCPropertyDecl*> SuperPropMap; if (ObjCInterfaceDecl *IDecl = dyn_cast<ObjCInterfaceDecl>(CDecl)) CollectSuperClassPropertyImplementations(IDecl, SuperPropMap); |