Allow the next catoregory slot to be null.

llvm-svn: 69969
This commit is contained in:
Steve Naroff 2009-04-24 16:08:42 +00:00
parent c1396a2313
commit 54b6db1763
1 changed files with 3 additions and 1 deletions

View File

@ -298,7 +298,9 @@ void PCHDeclReader::VisitObjCCategoryDecl(ObjCCategoryDecl *CD) {
for (unsigned I = 0; I != NumProtoRefs; ++I)
ProtoRefs.push_back(cast<ObjCProtocolDecl>(Reader.GetDecl(Record[Idx++])));
CD->setProtocolList(&ProtoRefs[0], NumProtoRefs, Reader.getContext());
CD->setNextClassCategory(cast<ObjCCategoryDecl>(Reader.GetDecl(Record[Idx++])));
unsigned nextCat = Record[Idx++];
CD->setNextClassCategory(nextCat ?
cast<ObjCCategoryDecl>(Reader.GetDecl(nextCat)) : 0);
CD->setLocEnd(SourceLocation::getFromRawEncoding(Record[Idx++]));
}