diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-04-23 22:34:55 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-04-23 22:34:55 +0000 |
commit | 133f482ddc2704ebcb23e2a743f1812173a42e91 (patch) | |
tree | 3219522409732b4c9177b05560e0fb3cbe936e7b | |
parent | 319ac896a0fef7365d5589b8021db7e41207fe42 (diff) |
PCH support for categories in Objective-C interfaces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69933 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Frontend/PCHReader.cpp | 4 | ||||
-rw-r--r-- | lib/Frontend/PCHWriter.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/Frontend/PCHReader.cpp b/lib/Frontend/PCHReader.cpp index 2caab328d9..eef1029724 100644 --- a/lib/Frontend/PCHReader.cpp +++ b/lib/Frontend/PCHReader.cpp @@ -239,13 +239,13 @@ void PCHDeclReader::VisitObjCInterfaceDecl(ObjCInterfaceDecl *ID) { for (unsigned I = 0; I != NumIvars; ++I) IVars.push_back(cast<ObjCIvarDecl>(Reader.GetDecl(Record[Idx++]))); ID->setIVarList(&IVars[0], NumIvars, Reader.getContext()); - + ID->setCategoryList( + cast_or_null<ObjCCategoryDecl>(Reader.GetDecl(Record[Idx++]))); ID->setForwardDecl(Record[Idx++]); ID->setImplicitInterfaceDecl(Record[Idx++]); ID->setClassLoc(SourceLocation::getFromRawEncoding(Record[Idx++])); ID->setSuperClassLoc(SourceLocation::getFromRawEncoding(Record[Idx++])); ID->setAtEndLoc(SourceLocation::getFromRawEncoding(Record[Idx++])); - // FIXME: add categories. } void PCHDeclReader::VisitObjCIvarDecl(ObjCIvarDecl *IVD) { diff --git a/lib/Frontend/PCHWriter.cpp b/lib/Frontend/PCHWriter.cpp index 9a60625d1f..11302d136e 100644 --- a/lib/Frontend/PCHWriter.cpp +++ b/lib/Frontend/PCHWriter.cpp @@ -415,12 +415,12 @@ void PCHDeclWriter::VisitObjCInterfaceDecl(ObjCInterfaceDecl *D) { for (ObjCInterfaceDecl::ivar_iterator I = D->ivar_begin(), IEnd = D->ivar_end(); I != IEnd; ++I) Writer.AddDeclRef(*I, Record); + Writer.AddDeclRef(D->getCategoryList(), Record); Record.push_back(D->isForwardDecl()); Record.push_back(D->isImplicitInterfaceDecl()); Writer.AddSourceLocation(D->getClassLoc(), Record); Writer.AddSourceLocation(D->getSuperClassLoc(), Record); Writer.AddSourceLocation(D->getLocEnd(), Record); - // FIXME: add categories. Code = pch::DECL_OBJC_INTERFACE; } |