diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-04-24 00:11:27 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-04-24 00:11:27 +0000 |
commit | 8fc463adf0116fdcbff86e9cca11955aad1649fe (patch) | |
tree | fed115bbf0f5550469216d9d11094c4c558e6763 /lib/Sema/SemaExprObjC.cpp | |
parent | f97364a022bb4d12b119fab0b5934b4d420878c7 (diff) |
Eliminate Sema::ObjCImplementations, relying instead on name lookup. What's good for uniformity is good for PCH (or is it the other way around?).
As part of this, make ObjCImplDecl inherit from NamedDecl (since
ObjCImplementationDecls now need to have names so that they can be
found). This brings ObjCImplDecl very, very close to
ObjCContainerDecl; we may be able to merge them soon.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69941 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprObjC.cpp')
-rw-r--r-- | lib/Sema/SemaExprObjC.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp index 1df7f3dcc9..d48ba4470c 100644 --- a/lib/Sema/SemaExprObjC.cpp +++ b/lib/Sema/SemaExprObjC.cpp @@ -222,8 +222,8 @@ ObjCMethodDecl *Sema::LookupPrivateClassMethod(Selector Sel, ObjCMethodDecl *Method = 0; // lookup in class and all superclasses while (ClassDecl && !Method) { - if (ObjCImplementationDecl *ImpDecl = - ObjCImplementations[ClassDecl->getIdentifier()]) + if (ObjCImplementationDecl *ImpDecl + = LookupObjCImplementation(ClassDecl->getIdentifier())) Method = ImpDecl->getClassMethod(Context, Sel); // Look through local category implementations associated with the class. @@ -255,8 +255,8 @@ ObjCMethodDecl *Sema::LookupPrivateInstanceMethod(Selector Sel, ObjCMethodDecl *Method = 0; while (ClassDecl && !Method) { // If we have implementations in scope, check "private" methods. - if (ObjCImplementationDecl *ImpDecl = - ObjCImplementations[ClassDecl->getIdentifier()]) + if (ObjCImplementationDecl *ImpDecl + = LookupObjCImplementation(ClassDecl->getIdentifier())) Method = ImpDecl->getInstanceMethod(Context, Sel); // Look through local category implementations associated with the class. @@ -288,8 +288,8 @@ Action::OwningExprResult Sema::ActOnClassPropertyRefExpr( if (!Getter) if (ObjCMethodDecl *CurMeth = getCurMethodDecl()) if (ObjCInterfaceDecl *ClassDecl = CurMeth->getClassInterface()) - if (ObjCImplementationDecl *ImpDecl = - ObjCImplementations[ClassDecl->getIdentifier()]) + if (ObjCImplementationDecl *ImpDecl + = LookupObjCImplementation(ClassDecl->getIdentifier())) Getter = ImpDecl->getClassMethod(Context, Sel); if (Getter) { @@ -310,8 +310,8 @@ Action::OwningExprResult Sema::ActOnClassPropertyRefExpr( // methods. if (ObjCMethodDecl *CurMeth = getCurMethodDecl()) if (ObjCInterfaceDecl *ClassDecl = CurMeth->getClassInterface()) - if (ObjCImplementationDecl *ImpDecl = - ObjCImplementations[ClassDecl->getIdentifier()]) + if (ObjCImplementationDecl *ImpDecl + = LookupObjCImplementation(ClassDecl->getIdentifier())) Setter = ImpDecl->getClassMethod(Context, SetterSel); } // Look through local category implementations associated with the class. |