diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-08-09 10:54:20 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-08-09 10:54:20 +0000 |
commit | 13257c5527007ac6ce0c74c45b450e83d58316a8 (patch) | |
tree | 886ccfdc9887de5e656561f6c4fbcc202432ad16 /clang/lib/Frontend/PCHReaderDecl.cpp | |
parent | 5b6a03f4906abda74da0a3f5fa4515d2613f49d7 (diff) | |
download | bcm5719-llvm-13257c5527007ac6ce0c74c45b450e83d58316a8.tar.gz bcm5719-llvm-13257c5527007ac6ce0c74c45b450e83d58316a8.zip |
Support ObjC implementation decls for PCH.
Strictly speaking, implementations don't go in headers but there's no law against it.
llvm-svn: 110567
Diffstat (limited to 'clang/lib/Frontend/PCHReaderDecl.cpp')
-rw-r--r-- | clang/lib/Frontend/PCHReaderDecl.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Frontend/PCHReaderDecl.cpp b/clang/lib/Frontend/PCHReaderDecl.cpp index 930448419e2..6c0bdf6068f 100644 --- a/clang/lib/Frontend/PCHReaderDecl.cpp +++ b/clang/lib/Frontend/PCHReaderDecl.cpp @@ -514,7 +514,8 @@ void PCHDeclReader::VisitObjCImplementationDecl(ObjCImplementationDecl *D) { VisitObjCImplDecl(D); D->setSuperClass( cast_or_null<ObjCInterfaceDecl>(Reader.GetDecl(Record[Idx++]))); - // FIXME. Add reading of IvarInitializers and NumIvarInitializers. + llvm::tie(D->IvarInitializers, D->NumIvarInitializers) + = Reader.ReadCXXBaseOrMemberInitializers(Cursor, Record, Idx); } @@ -1298,7 +1299,7 @@ static bool isConsumerInterestedIn(Decl *D) { Var->isThisDeclarationADefinition() == VarDecl::Definition; if (FunctionDecl *Func = dyn_cast<FunctionDecl>(D)) return Func->isThisDeclarationADefinition(); - return isa<ObjCProtocolDecl>(D); + return isa<ObjCProtocolDecl>(D) || isa<ObjCImplementationDecl>(D); } /// \brief Get the correct cursor and offset for loading a type. |