diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-10-19 02:25:16 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-10-19 02:25:16 +0000 |
commit | 7c81c2a5915878e4aa6908a097290fd47fb3a154 (patch) | |
tree | c29464eed7bb917ee51ef0e679d81c77017f62b8 /lib/AST/DeclObjC.cpp | |
parent | 53e535161dfa9850de394b300915fc250eb0fdf4 (diff) |
Don't forget to complete the objc interface before asking for information,
otherwise lldb will suffer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142471 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclObjC.cpp')
-rw-r--r-- | lib/AST/DeclObjC.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp index 0481f9cdf5..7eb2688134 100644 --- a/lib/AST/DeclObjC.cpp +++ b/lib/AST/DeclObjC.cpp @@ -237,6 +237,9 @@ const ObjCCategoryDecl* ObjCCategoryDecl::getNextClassExtension() const { ObjCIvarDecl *ObjCInterfaceDecl::lookupInstanceVariable(IdentifierInfo *ID, ObjCInterfaceDecl *&clsDeclared) { + if (ExternallyCompleted) + LoadExternalDefinition(); + ObjCInterfaceDecl* ClassDecl = this; while (ClassDecl != NULL) { if (ObjCIvarDecl *I = ClassDecl->getIvarDecl(ID)) { @@ -261,6 +264,9 @@ ObjCIvarDecl *ObjCInterfaceDecl::lookupInstanceVariable(IdentifierInfo *ID, /// the it returns NULL. ObjCInterfaceDecl *ObjCInterfaceDecl::lookupInheritedClass( const IdentifierInfo*ICName) { + if (ExternallyCompleted) + LoadExternalDefinition(); + ObjCInterfaceDecl* ClassDecl = this; while (ClassDecl != NULL) { if (ClassDecl->getIdentifier() == ICName) @@ -315,6 +321,9 @@ ObjCMethodDecl *ObjCInterfaceDecl::lookupMethod(Selector Sel, ObjCMethodDecl *ObjCInterfaceDecl::lookupPrivateMethod( const Selector &Sel, bool Instance) { + if (ExternallyCompleted) + LoadExternalDefinition(); + ObjCMethodDecl *Method = 0; if (ObjCImplementationDecl *ImpDecl = getImplementation()) Method = Instance ? ImpDecl->getInstanceMethod(Sel) |