PCH support for CompoundLiteralExpr. This is the last C expression
that does not require PCH support for statements. Only AddrLabelExpr,
StmtExpr, and BlockExpr remain (for C).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69255 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/PCHReader.cpp b/lib/Frontend/PCHReader.cpp
index 2da35a0..e24a155 100644
--- a/lib/Frontend/PCHReader.cpp
+++ b/lib/Frontend/PCHReader.cpp
@@ -257,6 +257,7 @@
     unsigned VisitImplicitCastExpr(ImplicitCastExpr *E);
     unsigned VisitExplicitCastExpr(ExplicitCastExpr *E);
     unsigned VisitCStyleCastExpr(CStyleCastExpr *E);
+    unsigned VisitCompoundLiteralExpr(CompoundLiteralExpr *E);
     unsigned VisitExtVectorElementExpr(ExtVectorElementExpr *E);
     unsigned VisitInitListExpr(InitListExpr *E);
     unsigned VisitDesignatedInitExpr(DesignatedInitExpr *E);
@@ -447,6 +448,14 @@
   return 1;
 }
 
+unsigned PCHStmtReader::VisitCompoundLiteralExpr(CompoundLiteralExpr *E) {
+  VisitExpr(E);
+  E->setLParenLoc(SourceLocation::getFromRawEncoding(Record[Idx++]));
+  E->setInitializer(ExprStack.back());
+  E->setFileScope(Record[Idx++]);
+  return 1;
+}
+
 unsigned PCHStmtReader::VisitExtVectorElementExpr(ExtVectorElementExpr *E) {
   VisitExpr(E);
   E->setBase(ExprStack.back());
@@ -2103,6 +2112,10 @@
       E = new (Context) CStyleCastExpr(Empty);
       break;
 
+    case pch::EXPR_COMPOUND_LITERAL:
+      E = new (Context) CompoundLiteralExpr(Empty);
+      break;
+
     case pch::EXPR_EXT_VECTOR_ELEMENT:
       E = new (Context) ExtVectorElementExpr(Empty);
       break;