diff options
author | Steve Naroff <snaroff@apple.com> | 2009-04-24 16:08:42 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2009-04-24 16:08:42 +0000 |
commit | 521c91024febe01213f134528279f81a2c13bf02 (patch) | |
tree | 350dc703f413be29883a7176165a0fa0ac184916 /lib/Frontend/PCHReader.cpp | |
parent | a864cf7c1d774a0f790bfc46befc87d9dbf1f65c (diff) |
Allow the next catoregory slot to be null.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69969 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHReader.cpp')
-rw-r--r-- | lib/Frontend/PCHReader.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Frontend/PCHReader.cpp b/lib/Frontend/PCHReader.cpp index 06a7258cda..d50ab8310b 100644 --- a/lib/Frontend/PCHReader.cpp +++ b/lib/Frontend/PCHReader.cpp @@ -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++])); } |