[cfe-commits] r69933 - in /cfe/trunk/lib/Frontend: PCHReader.cpp PCHWriter.cpp
Douglas Gregor
dgregor at apple.com
Thu Apr 23 15:34:55 PDT 2009
Author: dgregor
Date: Thu Apr 23 17:34:55 2009
New Revision: 69933
URL: http://llvm.org/viewvc/llvm-project?rev=69933&view=rev
Log:
PCH support for categories in Objective-C interfaces.
Modified:
cfe/trunk/lib/Frontend/PCHReader.cpp
cfe/trunk/lib/Frontend/PCHWriter.cpp
Modified: cfe/trunk/lib/Frontend/PCHReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHReader.cpp?rev=69933&r1=69932&r2=69933&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/PCHReader.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHReader.cpp Thu Apr 23 17:34:55 2009
@@ -239,13 +239,13 @@
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) {
Modified: cfe/trunk/lib/Frontend/PCHWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHWriter.cpp?rev=69933&r1=69932&r2=69933&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/PCHWriter.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHWriter.cpp Thu Apr 23 17:34:55 2009
@@ -415,12 +415,12 @@
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;
}
More information about the cfe-commits
mailing list