summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-23 22:34:55 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-23 22:34:55 +0000
commitf6c2a27e16230070b29d67dbf1162dca4fd1618f (patch)
tree4ce3ae9dc2c64a8ed23fc6cceb11f3dd2d2556be /clang
parent512b07780327f392833bded86f0277f13a61db44 (diff)
downloadbcm5719-llvm-f6c2a27e16230070b29d67dbf1162dca4fd1618f.tar.gz
bcm5719-llvm-f6c2a27e16230070b29d67dbf1162dca4fd1618f.zip
PCH support for categories in Objective-C interfaces.
llvm-svn: 69933
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Frontend/PCHReader.cpp4
-rw-r--r--clang/lib/Frontend/PCHWriter.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Frontend/PCHReader.cpp b/clang/lib/Frontend/PCHReader.cpp
index 2caab328d9a..eef1029724f 100644
--- a/clang/lib/Frontend/PCHReader.cpp
+++ b/clang/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/clang/lib/Frontend/PCHWriter.cpp b/clang/lib/Frontend/PCHWriter.cpp
index 9a60625d1f0..11302d136ed 100644
--- a/clang/lib/Frontend/PCHWriter.cpp
+++ b/clang/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;
}
OpenPOWER on IntegriCloud