From 515b505c3ead33934f8d9f917712e7bb25acf0a3 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Thu, 23 Apr 2009 03:59:07 +0000 Subject: PCH (de-)serialization of the protocols in an ObjCInterfaceDecl llvm-svn: 69860 --- clang/lib/Frontend/PCHWriter.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'clang/lib/Frontend/PCHWriter.cpp') 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; } -- cgit v1.2.3