aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/PCHReaderDecl.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-05-22 22:34:23 +0000
committerTed Kremenek <kremenek@apple.com>2009-05-22 22:34:23 +0000
commit66ef111b167833c197cded0a1befab4a483d7d6d (patch)
tree1c1392cf71c7c53d0f7de0db20b039f9ed111b6c /lib/Frontend/PCHReaderDecl.cpp
parentd59a5bd0ab7821a643c540df8c84c70fef76a1c2 (diff)
Fix PCH crash caused by new assertions in llvm::SmallVector. Use
ProtoRefs.data() instead of &ProtoRefs[0] to access the raw buffer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72291 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHReaderDecl.cpp')
-rw-r--r--lib/Frontend/PCHReaderDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Frontend/PCHReaderDecl.cpp b/lib/Frontend/PCHReaderDecl.cpp
index 64c8e6f7c6..53dd6df61b 100644
--- a/lib/Frontend/PCHReaderDecl.cpp
+++ b/lib/Frontend/PCHReaderDecl.cpp
@@ -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++]));
}