PCH support for ObjCCategoryImplDecl (which can't be tested now).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69856 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h
index de32afa..0e1de5e 100644
--- a/include/clang/AST/DeclObjC.h
+++ b/include/clang/AST/DeclObjC.h
@@ -904,7 +904,8 @@
IdentifierInfo *getIdentifier() const {
return Id;
}
-
+ void setIdentifier(IdentifierInfo *II) { Id = II; }
+
/// getNameAsCString - Get the name of identifier for the class
/// interface associated with this implementation as a C string
/// (const char*).
diff --git a/lib/Frontend/PCHReader.cpp b/lib/Frontend/PCHReader.cpp
index c3d4bcf..0ad93dc 100644
--- a/lib/Frontend/PCHReader.cpp
+++ b/lib/Frontend/PCHReader.cpp
@@ -329,7 +329,7 @@
void PCHDeclReader::VisitObjCCategoryImplDecl(ObjCCategoryImplDecl *D) {
VisitObjCImplDecl(D);
- // FIXME: Implement.
+ D->setIdentifier(Reader.GetIdentifierInfo(Record, Idx));
}
void PCHDeclReader::VisitObjCImplementationDecl(ObjCImplementationDecl *D) {
@@ -2265,7 +2265,7 @@
}
case pch::DECL_OBJC_CATEGORY_IMPL: {
- // FIXME: Implement.
+ D = ObjCCategoryImplDecl::Create(Context, 0, SourceLocation(), 0, 0);
break;
}
diff --git a/lib/Frontend/PCHWriter.cpp b/lib/Frontend/PCHWriter.cpp
index 36d9170..0a0a38d 100644
--- a/lib/Frontend/PCHWriter.cpp
+++ b/lib/Frontend/PCHWriter.cpp
@@ -500,7 +500,7 @@
void PCHDeclWriter::VisitObjCCategoryImplDecl(ObjCCategoryImplDecl *D) {
VisitObjCImplDecl(D);
- // FIXME: Implement.
+ Writer.AddIdentifierRef(D->getIdentifier(), Record);
Code = pch::DECL_OBJC_CATEGORY_IMPL;
}