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/PCHWriterDecl.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/PCHWriterDecl.cpp')
-rw-r--r-- | clang/lib/Frontend/PCHWriterDecl.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Frontend/PCHWriterDecl.cpp b/clang/lib/Frontend/PCHWriterDecl.cpp index ec5c575efc3..6a78140b3ad 100644 --- a/clang/lib/Frontend/PCHWriterDecl.cpp +++ b/clang/lib/Frontend/PCHWriterDecl.cpp @@ -468,7 +468,8 @@ void PCHDeclWriter::VisitObjCCategoryImplDecl(ObjCCategoryImplDecl *D) { void PCHDeclWriter::VisitObjCImplementationDecl(ObjCImplementationDecl *D) { VisitObjCImplDecl(D); Writer.AddDeclRef(D->getSuperClass(), Record); - // FIXME add writing of IvarInitializers and NumIvarInitializers. + Writer.AddCXXBaseOrMemberInitializers(D->IvarInitializers, + D->NumIvarInitializers, Record); Code = pch::DECL_OBJC_IMPLEMENTATION; } @@ -1096,8 +1097,8 @@ void PCHWriter::WriteDeclsBlockAbbrevs() { /// relatively painless since they would presumably only do it for top-level /// decls. static bool isRequiredDecl(const Decl *D, ASTContext &Context) { - // File scoped assembly must be seen. - if (isa<FileScopeAsmDecl>(D)) + // File scoped assembly or obj-c implementation must be seen. + if (isa<FileScopeAsmDecl>(D) || isa<ObjCImplementationDecl>(D)) return true; return Context.DeclMustBeEmitted(D); |