Fix PCH crash caused by new assertions in llvm::SmallVector. Use

ProtoRefs.data() instead of &ProtoRefs[0] to access the raw buffer.

llvm-svn: 72291
This commit is contained in:
Ted Kremenek 2009-05-22 22:34:23 +00:00
parent ed28b6d028
commit 92f3d1ff1c
1 changed files with 1 additions and 1 deletions

View File

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