diff options
Diffstat (limited to 'lib/Frontend/PCHReader.cpp')
-rw-r--r-- | lib/Frontend/PCHReader.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/Frontend/PCHReader.cpp b/lib/Frontend/PCHReader.cpp index 67c7dc7337..b829075913 100644 --- a/lib/Frontend/PCHReader.cpp +++ b/lib/Frontend/PCHReader.cpp @@ -262,6 +262,8 @@ namespace { unsigned VisitTypesCompatibleExpr(TypesCompatibleExpr *E); unsigned VisitChooseExpr(ChooseExpr *E); unsigned VisitGNUNullExpr(GNUNullExpr *E); + unsigned VisitShuffleVectorExpr(ShuffleVectorExpr *E); + unsigned VisitBlockDeclRefExpr(BlockDeclRefExpr *E); }; } @@ -483,6 +485,23 @@ unsigned PCHStmtReader::VisitGNUNullExpr(GNUNullExpr *E) { return 0; } +unsigned PCHStmtReader::VisitShuffleVectorExpr(ShuffleVectorExpr *E) { + VisitExpr(E); + unsigned NumExprs = Record[Idx++]; + E->setExprs(&ExprStack[ExprStack.size() - NumExprs], NumExprs); + E->setBuiltinLoc(SourceLocation::getFromRawEncoding(Record[Idx++])); + E->setRParenLoc(SourceLocation::getFromRawEncoding(Record[Idx++])); + return NumExprs; +} + +unsigned PCHStmtReader::VisitBlockDeclRefExpr(BlockDeclRefExpr *E) { + VisitExpr(E); + E->setDecl(cast<ValueDecl>(Reader.GetDecl(Record[Idx++]))); + E->setLocation(SourceLocation::getFromRawEncoding(Record[Idx++])); + E->setByRef(Record[Idx++]); + return 0; +} + // FIXME: use the diagnostics machinery static bool Error(const char *Str) { std::fprintf(stderr, "%s\n", Str); @@ -2016,6 +2035,15 @@ Expr *PCHReader::ReadExpr() { case pch::EXPR_GNU_NULL: E = new (Context) GNUNullExpr(Empty); break; + + case pch::EXPR_SHUFFLE_VECTOR: + E = new (Context) ShuffleVectorExpr(Empty); + break; + + case pch::EXPR_BLOCK_DECL_REF: + // FIXME: untested until we have statement and block support + E = new (Context) BlockDeclRefExpr(Empty); + break; } // We hit an EXPR_STOP, so we're done with this expression. |