diff options
Diffstat (limited to 'lib/Serialization/ASTReaderStmt.cpp')
-rw-r--r-- | lib/Serialization/ASTReaderStmt.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/Serialization/ASTReaderStmt.cpp b/lib/Serialization/ASTReaderStmt.cpp index c15f6b0..ca5d0be 100644 --- a/lib/Serialization/ASTReaderStmt.cpp +++ b/lib/Serialization/ASTReaderStmt.cpp @@ -1785,6 +1785,9 @@ OMPClause *OMPClauseReader::readClause() { case OMPC_flush: C = OMPFlushClause::CreateEmpty(Context, Record[Idx++]); break; + case OMPC_depend: + C = OMPDependClause::CreateEmpty(Context, Record[Idx++]); + break; } Visit(C); C->setLocStart(Reader->ReadSourceLocation(Record, Idx)); @@ -2049,6 +2052,19 @@ void OMPClauseReader::VisitOMPFlushClause(OMPFlushClause *C) { C->setVarRefs(Vars); } +void OMPClauseReader::VisitOMPDependClause(OMPDependClause *C) { + C->setLParenLoc(Reader->ReadSourceLocation(Record, Idx)); + C->setDependencyKind(static_cast<OpenMPDependClauseKind>(Record[Idx++])); + C->setDependencyLoc(Reader->ReadSourceLocation(Record, Idx)); + C->setColonLoc(Reader->ReadSourceLocation(Record, Idx)); + unsigned NumVars = C->varlist_size(); + SmallVector<Expr *, 16> Vars; + Vars.reserve(NumVars); + for (unsigned i = 0; i != NumVars; ++i) + Vars.push_back(Reader->Reader.ReadSubExpr()); + C->setVarRefs(Vars); +} + //===----------------------------------------------------------------------===// // OpenMP Directives. //===----------------------------------------------------------------------===// @@ -2233,6 +2249,19 @@ void ASTStmtReader::VisitOMPTeamsDirective(OMPTeamsDirective *D) { VisitOMPExecutableDirective(D); } +void ASTStmtReader::VisitOMPCancellationPointDirective( + OMPCancellationPointDirective *D) { + VisitStmt(D); + VisitOMPExecutableDirective(D); + D->setCancelRegion(static_cast<OpenMPDirectiveKind>(Record[Idx++])); +} + +void ASTStmtReader::VisitOMPCancelDirective(OMPCancelDirective *D) { + VisitStmt(D); + VisitOMPExecutableDirective(D); + D->setCancelRegion(static_cast<OpenMPDirectiveKind>(Record[Idx++])); +} + //===----------------------------------------------------------------------===// // ASTReader Implementation //===----------------------------------------------------------------------===// @@ -2836,6 +2865,14 @@ Stmt *ASTReader::ReadStmtFromStream(ModuleFile &F) { Context, Record[ASTStmtReader::NumStmtFields], Empty); break; + case STMT_OMP_CANCELLATION_POINT_DIRECTIVE: + S = OMPCancellationPointDirective::CreateEmpty(Context, Empty); + break; + + case STMT_OMP_CANCEL_DIRECTIVE: + S = OMPCancelDirective::CreateEmpty(Context, Empty); + break; + case EXPR_CXX_OPERATOR_CALL: S = new (Context) CXXOperatorCallExpr(Context, Empty); break; |