summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PCHWriter.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-23 03:59:07 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-23 03:59:07 +0000
commit515b505c3ead33934f8d9f917712e7bb25acf0a3 (patch)
treec965ce5bbbf7ba942a069ead1276838f4405c5bd /clang/lib/Frontend/PCHWriter.cpp
parent0ebb9964f93b7d1a76f1ebe27cb1b44334c92f59 (diff)
downloadbcm5719-llvm-515b505c3ead33934f8d9f917712e7bb25acf0a3.tar.gz
bcm5719-llvm-515b505c3ead33934f8d9f917712e7bb25acf0a3.zip
PCH (de-)serialization of the protocols in an ObjCInterfaceDecl
llvm-svn: 69860
Diffstat (limited to 'clang/lib/Frontend/PCHWriter.cpp')
-rw-r--r--clang/lib/Frontend/PCHWriter.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/Frontend/PCHWriter.cpp b/clang/lib/Frontend/PCHWriter.cpp
index ea2f359e503..dd8d95a56df 100644
--- a/clang/lib/Frontend/PCHWriter.cpp
+++ b/clang/lib/Frontend/PCHWriter.cpp
@@ -405,6 +405,11 @@ void PCHDeclWriter::VisitObjCInterfaceDecl(ObjCInterfaceDecl *D) {
VisitObjCContainerDecl(D);
Writer.AddTypeRef(QualType(D->getTypeForDecl(), 0), Record);
Writer.AddDeclRef(D->getSuperClass(), Record);
+ Record.push_back(D->protocol_size());
+ for (ObjCInterfaceDecl::protocol_iterator P = D->protocol_begin(),
+ PEnd = D->protocol_end();
+ P != PEnd; ++P)
+ Writer.AddDeclRef(*P, Record);
Record.push_back(D->ivar_size());
for (ObjCInterfaceDecl::ivar_iterator I = D->ivar_begin(),
IEnd = D->ivar_end(); I != IEnd; ++I)
@@ -414,7 +419,7 @@ void PCHDeclWriter::VisitObjCInterfaceDecl(ObjCInterfaceDecl *D) {
Writer.AddSourceLocation(D->getClassLoc(), Record);
Writer.AddSourceLocation(D->getSuperClassLoc(), Record);
Writer.AddSourceLocation(D->getLocEnd(), Record);
- // FIXME: add protocols, categories.
+ // FIXME: add categories.
Code = pch::DECL_OBJC_INTERFACE;
}
OpenPOWER on IntegriCloud