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/PCHWriter.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/PCHWriter.cpp')
-rw-r--r-- | lib/Frontend/PCHWriter.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Frontend/PCHWriter.cpp b/lib/Frontend/PCHWriter.cpp index f96288864b..c89e3546bf 100644 --- a/lib/Frontend/PCHWriter.cpp +++ b/lib/Frontend/PCHWriter.cpp @@ -464,6 +464,7 @@ namespace { void VisitImplicitCastExpr(ImplicitCastExpr *E); void VisitExplicitCastExpr(ExplicitCastExpr *E); void VisitCStyleCastExpr(CStyleCastExpr *E); + void VisitCompoundLiteralExpr(CompoundLiteralExpr *E); void VisitExtVectorElementExpr(ExtVectorElementExpr *E); void VisitInitListExpr(InitListExpr *E); void VisitDesignatedInitExpr(DesignatedInitExpr *E); @@ -647,6 +648,14 @@ void PCHStmtWriter::VisitCStyleCastExpr(CStyleCastExpr *E) { Code = pch::EXPR_CSTYLE_CAST; } +void PCHStmtWriter::VisitCompoundLiteralExpr(CompoundLiteralExpr *E) { + VisitExpr(E); + Writer.AddSourceLocation(E->getLParenLoc(), Record); + Writer.WriteSubExpr(E->getInitializer()); + Record.push_back(E->isFileScope()); + Code = pch::EXPR_COMPOUND_LITERAL; +} + void PCHStmtWriter::VisitExtVectorElementExpr(ExtVectorElementExpr *E) { VisitExpr(E); Writer.WriteSubExpr(E->getBase()); |