diff options
Diffstat (limited to 'clang/lib/Serialization/ASTWriterStmt.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriterStmt.cpp | 56 |
1 files changed, 54 insertions, 2 deletions
diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp index d4f669ea0183..2bb5e4f3563d 100644 --- a/clang/lib/Serialization/ASTWriterStmt.cpp +++ b/clang/lib/Serialization/ASTWriterStmt.cpp @@ -115,6 +115,7 @@ void ASTStmtWriter::VisitDefaultStmt(DefaultStmt *S) { void ASTStmtWriter::VisitLabelStmt(LabelStmt *S) { VisitStmt(S); + Record.push_back(S->isSideEntry()); Record.AddDeclRef(S->getDecl()); Record.AddStmt(S->getSubStmt()); Record.AddSourceLocation(S->getIdentLoc()); @@ -579,6 +580,17 @@ void ASTStmtWriter::VisitConstantExpr(ConstantExpr *E) { Code = serialization::EXPR_CONSTANT; } +void ASTStmtWriter::VisitSYCLUniqueStableNameExpr(SYCLUniqueStableNameExpr *E) { + VisitExpr(E); + + Record.AddSourceLocation(E->getLocation()); + Record.AddSourceLocation(E->getLParenLocation()); + Record.AddSourceLocation(E->getRParenLocation()); + Record.AddTypeSourceInfo(E->getTypeSourceInfo()); + + Code = serialization::EXPR_SYCL_UNIQUE_STABLE_NAME; +} + void ASTStmtWriter::VisitPredefinedExpr(PredefinedExpr *E) { VisitExpr(E); @@ -2170,18 +2182,29 @@ void ASTStmtWriter::VisitSEHLeaveStmt(SEHLeaveStmt *S) { // OpenMP Directives. //===----------------------------------------------------------------------===// +void ASTStmtWriter::VisitOMPCanonicalLoop(OMPCanonicalLoop *S) { + VisitStmt(S); + for (Stmt *SubStmt : S->SubStmts) + Record.AddStmt(SubStmt); + Code = serialization::STMT_OMP_CANONICAL_LOOP; +} + void ASTStmtWriter::VisitOMPExecutableDirective(OMPExecutableDirective *E) { Record.writeOMPChildren(E->Data); Record.AddSourceLocation(E->getBeginLoc()); Record.AddSourceLocation(E->getEndLoc()); } -void ASTStmtWriter::VisitOMPLoopDirective(OMPLoopDirective *D) { +void ASTStmtWriter::VisitOMPLoopBasedDirective(OMPLoopBasedDirective *D) { VisitStmt(D); - Record.writeUInt32(D->getCollapsedNumber()); + Record.writeUInt32(D->getLoopsNumber()); VisitOMPExecutableDirective(D); } +void ASTStmtWriter::VisitOMPLoopDirective(OMPLoopDirective *D) { + VisitOMPLoopBasedDirective(D); +} + void ASTStmtWriter::VisitOMPParallelDirective(OMPParallelDirective *D) { VisitStmt(D); VisitOMPExecutableDirective(D); @@ -2194,6 +2217,16 @@ void ASTStmtWriter::VisitOMPSimdDirective(OMPSimdDirective *D) { Code = serialization::STMT_OMP_SIMD_DIRECTIVE; } +void ASTStmtWriter::VisitOMPTileDirective(OMPTileDirective *D) { + VisitOMPLoopBasedDirective(D); + Code = serialization::STMT_OMP_TILE_DIRECTIVE; +} + +void ASTStmtWriter::VisitOMPUnrollDirective(OMPUnrollDirective *D) { + VisitOMPLoopBasedDirective(D); + Code = serialization::STMT_OMP_UNROLL_DIRECTIVE; +} + void ASTStmtWriter::VisitOMPForDirective(OMPForDirective *D) { VisitOMPLoopDirective(D); Record.writeBool(D->hasCancel()); @@ -2525,6 +2558,25 @@ void ASTStmtWriter::VisitOMPTargetTeamsDistributeSimdDirective( Code = serialization::STMT_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD_DIRECTIVE; } +void ASTStmtWriter::VisitOMPInteropDirective(OMPInteropDirective *D) { + VisitStmt(D); + VisitOMPExecutableDirective(D); + Code = serialization::STMT_OMP_INTEROP_DIRECTIVE; +} + +void ASTStmtWriter::VisitOMPDispatchDirective(OMPDispatchDirective *D) { + VisitStmt(D); + VisitOMPExecutableDirective(D); + Record.AddSourceLocation(D->getTargetCallLoc()); + Code = serialization::STMT_OMP_DISPATCH_DIRECTIVE; +} + +void ASTStmtWriter::VisitOMPMaskedDirective(OMPMaskedDirective *D) { + VisitStmt(D); + VisitOMPExecutableDirective(D); + Code = serialization::STMT_OMP_MASKED_DIRECTIVE; +} + //===----------------------------------------------------------------------===// // ASTWriter Implementation //===----------------------------------------------------------------------===// |