diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-04-16 02:33:48 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-04-16 02:33:48 +0000 |
commit | ba6d7e7fa5f79959d3eef39adb5620d845ba5198 (patch) | |
tree | e438a1f60179c792329099c089f4de571037d158 /lib/Frontend/PCHReader.cpp | |
parent | d077d759d0c7fceee98f4e77b6423a3f11cfc849 (diff) |
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
Diffstat (limited to 'lib/Frontend/PCHReader.cpp')
-rw-r--r-- | lib/Frontend/PCHReader.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Frontend/PCHReader.cpp b/lib/Frontend/PCHReader.cpp index 2da35a09d6..e24a155146 100644 --- a/lib/Frontend/PCHReader.cpp +++ b/lib/Frontend/PCHReader.cpp @@ -257,6 +257,7 @@ namespace { 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 @@ unsigned PCHStmtReader::VisitCStyleCastExpr(CStyleCastExpr *E) { 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 @@ Expr *PCHReader::ReadExpr() { 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; |