[cfe-commits] r69969 - /cfe/trunk/lib/Frontend/PCHReader.cpp
Steve Naroff
snaroff at apple.com
Fri Apr 24 09:08:50 PDT 2009
Author: snaroff
Date: Fri Apr 24 11:08:42 2009
New Revision: 69969
URL: http://llvm.org/viewvc/llvm-project?rev=69969&view=rev
Log:
Allow the next catoregory slot to be null.
Modified:
cfe/trunk/lib/Frontend/PCHReader.cpp
Modified: cfe/trunk/lib/Frontend/PCHReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHReader.cpp?rev=69969&r1=69968&r2=69969&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/PCHReader.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHReader.cpp Fri Apr 24 11:08:42 2009
@@ -298,7 +298,9 @@
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++]));
}
More information about the cfe-commits
mailing list