Read/write CastExpr's CXXBaseSpecifierArray for PCH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107542 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/PCHReaderStmt.cpp b/lib/Frontend/PCHReaderStmt.cpp
index c2dea3a..28641e8 100644
--- a/lib/Frontend/PCHReaderStmt.cpp
+++ b/lib/Frontend/PCHReaderStmt.cpp
@@ -537,6 +537,14 @@
VisitExpr(E);
E->setSubExpr(Reader.ReadSubExpr());
E->setCastKind((CastExpr::CastKind)Record[Idx++]);
+ CXXBaseSpecifierArray &BasePath = E->getBasePath();
+ unsigned NumBaseSpecs = Record[Idx++];
+ while (NumBaseSpecs--) {
+ // FIXME: These gets leaked.
+ CXXBaseSpecifier *BaseSpec = new (*Reader.getContext()) CXXBaseSpecifier;
+ *BaseSpec = Reader.ReadCXXBaseSpecifier(Record, Idx);
+ BasePath.push_back(BaseSpec);
+ }
}
void PCHStmtReader::VisitBinaryOperator(BinaryOperator *E) {