summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PCHReader.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/PCHReader.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/PCHReader.cpp')
-rw-r--r--clang/lib/Frontend/PCHReader.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/Frontend/PCHReader.cpp b/clang/lib/Frontend/PCHReader.cpp
index 72dda6cc6e9..851eebc3552 100644
--- a/clang/lib/Frontend/PCHReader.cpp
+++ b/clang/lib/Frontend/PCHReader.cpp
@@ -227,6 +227,11 @@ void PCHDeclReader::VisitObjCInterfaceDecl(ObjCInterfaceDecl *ID) {
ID->setTypeForDecl(Reader.GetType(Record[Idx++]).getTypePtr());
ID->setSuperClass(cast_or_null<ObjCInterfaceDecl>
(Reader.GetDecl(Record[Idx++])));
+ unsigned NumProtocols = Record[Idx++];
+ llvm::SmallVector<ObjCProtocolDecl *, 16> Protocols;
+ Protocols.reserve(NumProtocols);
+ for (unsigned I = 0; I != NumProtocols; ++I)
+ Protocols.push_back(cast<ObjCProtocolDecl>(Reader.GetDecl(Record[Idx++])));
unsigned NumIvars = Record[Idx++];
llvm::SmallVector<ObjCIvarDecl *, 16> IVars;
IVars.reserve(NumIvars);
@@ -239,7 +244,7 @@ void PCHDeclReader::VisitObjCInterfaceDecl(ObjCInterfaceDecl *ID) {
ID->setClassLoc(SourceLocation::getFromRawEncoding(Record[Idx++]));
ID->setSuperClassLoc(SourceLocation::getFromRawEncoding(Record[Idx++]));
ID->setAtEndLoc(SourceLocation::getFromRawEncoding(Record[Idx++]));
- // FIXME: add protocols, categories.
+ // FIXME: add categories.
}
void PCHDeclReader::VisitObjCIvarDecl(ObjCIvarDecl *IVD) {
OpenPOWER on IntegriCloud