aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/PCHWriterDecl.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-08-09 10:54:20 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-08-09 10:54:20 +0000
commit9d50c0635fb213b2a1857e3f8488580f0dab2f98 (patch)
tree5a6a99b54cb553d9c9591462e4787c7687f757bb /lib/Frontend/PCHWriterDecl.cpp
parent8e706f4b8da141612861e127610141b8d17a9667 (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/PCHWriterDecl.cpp')
-rw-r--r--lib/Frontend/PCHWriterDecl.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Frontend/PCHWriterDecl.cpp b/lib/Frontend/PCHWriterDecl.cpp
index ec5c575efc..6a78140b3a 100644
--- a/lib/Frontend/PCHWriterDecl.cpp
+++ b/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);