PCH support for categories in Objective-C interfaces.

llvm-svn: 69933
This commit is contained in:
Douglas Gregor 2009-04-23 22:34:55 +00:00
parent 512b077803
commit f6c2a27e16
2 changed files with 3 additions and 3 deletions

View File

@ -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) {

View File

@ -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;
}