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 | 9d50c0635fb213b2a1857e3f8488580f0dab2f98 (patch) | |
tree | 5a6a99b54cb553d9c9591462e4787c7687f757bb /lib/Frontend/PCHReaderDecl.cpp | |
parent | 8e706f4b8da141612861e127610141b8d17a9667 (diff) |
Support ObjC implementation decls for PCH.
Strictly speaking, implementations don't go in headers but there's no law against it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110567 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHReaderDecl.cpp')
-rw-r--r-- | lib/Frontend/PCHReaderDecl.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Frontend/PCHReaderDecl.cpp b/lib/Frontend/PCHReaderDecl.cpp index 930448419e..6c0bdf6068 100644 --- a/lib/Frontend/PCHReaderDecl.cpp +++ b/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. |