forked from OSchip/llvm-project
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:
parent
ed28b6d028
commit
92f3d1ff1c
|
@ -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++]));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue