Support CXXPseudoDestructorExpr for PCH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106999 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/PCHReaderStmt.cpp b/lib/Frontend/PCHReaderStmt.cpp
index 5f9ee3b..5f27a7d 100644
--- a/lib/Frontend/PCHReaderStmt.cpp
+++ b/lib/Frontend/PCHReaderStmt.cpp
@@ -143,6 +143,7 @@
unsigned VisitCXXZeroInitValueExpr(CXXZeroInitValueExpr *E);
unsigned VisitCXXNewExpr(CXXNewExpr *E);
unsigned VisitCXXDeleteExpr(CXXDeleteExpr *E);
+ unsigned VisitCXXPseudoDestructorExpr(CXXPseudoDestructorExpr *E);
unsigned VisitCXXExprWithTemporaries(CXXExprWithTemporaries *E);
@@ -1146,6 +1147,28 @@
return 1;
}
+unsigned
+PCHStmtReader::VisitCXXPseudoDestructorExpr(CXXPseudoDestructorExpr *E) {
+ VisitExpr(E);
+
+ E->setBase(cast_or_null<Expr>(StmtStack.back()));
+ E->setArrow(Record[Idx++]);
+ E->setOperatorLoc(Reader.ReadSourceLocation(Record, Idx));
+ E->setQualifier(Reader.ReadNestedNameSpecifier(Record, Idx));
+ E->setQualifierRange(Reader.ReadSourceRange(Record, Idx));
+ E->setScopeTypeInfo(Reader.GetTypeSourceInfo(Record, Idx));
+ E->setColonColonLoc(Reader.ReadSourceLocation(Record, Idx));
+ E->setTildeLoc(Reader.ReadSourceLocation(Record, Idx));
+
+ IdentifierInfo *II = Reader.GetIdentifierInfo(Record, Idx);
+ if (II)
+ E->setDestroyedType(II, Reader.ReadSourceLocation(Record, Idx));
+ else
+ E->setDestroyedType(Reader.GetTypeSourceInfo(Record, Idx));
+
+ return 1;
+}
+
unsigned PCHStmtReader::VisitCXXExprWithTemporaries(CXXExprWithTemporaries *E) {
VisitExpr(E);
unsigned NumTemps = Record[Idx++];
@@ -1646,6 +1669,9 @@
case pch::EXPR_CXX_DELETE:
S = new (Context) CXXDeleteExpr(Empty);
break;
+ case pch::EXPR_CXX_PSEUDO_DESTRUCTOR:
+ S = new (Context) CXXPseudoDestructorExpr(Empty);
+ break;
case pch::EXPR_CXX_EXPR_WITH_TEMPORARIES:
S = new (Context) CXXExprWithTemporaries(Empty);