aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-23 02:53:57 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-23 02:53:57 +0000
commit10b0e1fa3aabd8877dbbc0df1f2414e04afd5fdd (patch)
tree88b68353398039fade287adc953f59661befb68a
parent2c2d43c557beca1b4ba4bd743f33978aecb46a97 (diff)
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
-rw-r--r--include/clang/AST/DeclObjC.h3
-rw-r--r--lib/Frontend/PCHReader.cpp4
-rw-r--r--lib/Frontend/PCHWriter.cpp2
3 files changed, 5 insertions, 4 deletions
diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h
index de32afa18f..0e1de5e8aa 100644
--- a/include/clang/AST/DeclObjC.h
+++ b/include/clang/AST/DeclObjC.h
@@ -904,7 +904,8 @@ public:
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 c3d4bcfa52..0ad93dc65c 100644
--- a/lib/Frontend/PCHReader.cpp
+++ b/lib/Frontend/PCHReader.cpp
@@ -329,7 +329,7 @@ void PCHDeclReader::VisitObjCImplDecl(ObjCImplDecl *D) {
void PCHDeclReader::VisitObjCCategoryImplDecl(ObjCCategoryImplDecl *D) {
VisitObjCImplDecl(D);
- // FIXME: Implement.
+ D->setIdentifier(Reader.GetIdentifierInfo(Record, Idx));
}
void PCHDeclReader::VisitObjCImplementationDecl(ObjCImplementationDecl *D) {
@@ -2265,7 +2265,7 @@ Decl *PCHReader::ReadDeclRecord(uint64_t Offset, unsigned Index) {
}
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 36d9170f38..0a0a38d874 100644
--- a/lib/Frontend/PCHWriter.cpp
+++ b/lib/Frontend/PCHWriter.cpp
@@ -500,7 +500,7 @@ void PCHDeclWriter::VisitObjCImplDecl(ObjCImplDecl *D) {
void PCHDeclWriter::VisitObjCCategoryImplDecl(ObjCCategoryImplDecl *D) {
VisitObjCImplDecl(D);
- // FIXME: Implement.
+ Writer.AddIdentifierRef(D->getIdentifier(), Record);
Code = pch::DECL_OBJC_CATEGORY_IMPL;
}