From: Douglas Gregor Date: Thu, 23 Apr 2009 02:53:57 +0000 (+0000) Subject: PCH support for ObjCCategoryImplDecl (which can't be tested now). X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=10b0e1fa3aabd8877dbbc0df1f2414e04afd5fdd;p=clang 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 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; }