diff options
| author | Alexey Bataev <a.bataev@hotmail.com> | 2015-07-01 06:57:41 +0000 |
|---|---|---|
| committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-07-01 06:57:41 +0000 |
| commit | 6d4ed0583033169f4a83f352e6ef0bd9275e34fa (patch) | |
| tree | 283082dc9a4eda33ade3539de6575c9305ec5a09 /clang/lib/Serialization | |
| parent | 2510ba3f6e3153d94171bf7b0c6735fe644841cf (diff) | |
| download | bcm5719-llvm-6d4ed0583033169f4a83f352e6ef0bd9275e34fa.tar.gz bcm5719-llvm-6d4ed0583033169f4a83f352e6ef0bd9275e34fa.zip | |
[OPENMP 4.0] Initial support for 'omp cancellation point' construct.
Add parsing and sema analysis for 'omp cancellation point' directive.
llvm-svn: 241145
Diffstat (limited to 'clang/lib/Serialization')
| -rw-r--r-- | clang/lib/Serialization/ASTReaderStmt.cpp | 11 | ||||
| -rw-r--r-- | clang/lib/Serialization/ASTWriterStmt.cpp | 8 |
2 files changed, 19 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTReaderStmt.cpp b/clang/lib/Serialization/ASTReaderStmt.cpp index f64d856a628..d7975c434f8 100644 --- a/clang/lib/Serialization/ASTReaderStmt.cpp +++ b/clang/lib/Serialization/ASTReaderStmt.cpp @@ -2249,6 +2249,13 @@ void ASTStmtReader::VisitOMPTeamsDirective(OMPTeamsDirective *D) { VisitOMPExecutableDirective(D); } +void ASTStmtReader::VisitOMPCancellationPointDirective( + OMPCancellationPointDirective *D) { + VisitStmt(D); + VisitOMPExecutableDirective(D); + D->setCancelRegion(static_cast<OpenMPDirectiveKind>(Record[Idx++])); +} + //===----------------------------------------------------------------------===// // ASTReader Implementation //===----------------------------------------------------------------------===// @@ -2852,6 +2859,10 @@ Stmt *ASTReader::ReadStmtFromStream(ModuleFile &F) { Context, Record[ASTStmtReader::NumStmtFields], Empty); break; + case STMT_OMP_CANCELLATION_POINT_DIRECTIVE: + S = OMPCancellationPointDirective::CreateEmpty(Context, Empty); + break; + case EXPR_CXX_OPERATOR_CALL: S = new (Context) CXXOperatorCallExpr(Context, Empty); break; diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp index 0f35f0ce8a3..846acd04d4f 100644 --- a/clang/lib/Serialization/ASTWriterStmt.cpp +++ b/clang/lib/Serialization/ASTWriterStmt.cpp @@ -2107,6 +2107,14 @@ void ASTStmtWriter::VisitOMPTeamsDirective(OMPTeamsDirective *D) { Code = serialization::STMT_OMP_TEAMS_DIRECTIVE; } +void ASTStmtWriter::VisitOMPCancellationPointDirective( + OMPCancellationPointDirective *D) { + VisitStmt(D); + VisitOMPExecutableDirective(D); + Record.push_back(D->getCancelRegion()); + Code = serialization::STMT_OMP_CANCELLATION_POINT_DIRECTIVE; +} + //===----------------------------------------------------------------------===// // ASTWriter Implementation //===----------------------------------------------------------------------===// |

