diff options
| author | cchen <cchen@cray.com> | 2019-12-05 13:43:48 -0500 |
|---|---|---|
| committer | Alexey Bataev <a.bataev@hotmail.com> | 2019-12-05 14:35:27 -0500 |
| commit | 47d6094d7fd463707598a0e65dd44a0d1cc279eb (patch) | |
| tree | 7f876af289cb4bbaed6de64f7a7c3e9ec3294368 /clang/lib/Serialization | |
| parent | 23e63a906d0387d5ac7e4d3a57401f016b14c677 (diff) | |
| download | bcm5719-llvm-47d6094d7fd463707598a0e65dd44a0d1cc279eb.tar.gz bcm5719-llvm-47d6094d7fd463707598a0e65dd44a0d1cc279eb.zip | |
[OpenMP50] Add parallel master construct
Reviewers: ABataev, jdoerfert
Reviewed By: ABataev
Subscribers: rnk, jholewinski, guansong, arphaman, jfb, cfe-commits, sandoval, dreachem
Tags: #clang
Differential Revision: https://reviews.llvm.org/D70726
Diffstat (limited to 'clang/lib/Serialization')
| -rw-r--r-- | clang/lib/Serialization/ASTReaderStmt.cpp | 13 | ||||
| -rw-r--r-- | clang/lib/Serialization/ASTWriterStmt.cpp | 8 |
2 files changed, 21 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTReaderStmt.cpp b/clang/lib/Serialization/ASTReaderStmt.cpp index 8837396d03d..f426ed3b8d3 100644 --- a/clang/lib/Serialization/ASTReaderStmt.cpp +++ b/clang/lib/Serialization/ASTReaderStmt.cpp @@ -2165,6 +2165,14 @@ void ASTStmtReader::VisitOMPParallelForSimdDirective( VisitOMPLoopDirective(D); } +void ASTStmtReader::VisitOMPParallelMasterDirective( + OMPParallelMasterDirective *D) { + VisitStmt(D); + // The NumClauses field was read in ReadStmtFromStream. + Record.skipInts(1); + VisitOMPExecutableDirective(D); +} + void ASTStmtReader::VisitOMPParallelSectionsDirective( OMPParallelSectionsDirective *D) { VisitStmt(D); @@ -3003,6 +3011,11 @@ Stmt *ASTReader::ReadStmtFromStream(ModuleFile &F) { break; } + case STMT_OMP_PARALLEL_MASTER_DIRECTIVE: + S = OMPParallelMasterDirective::CreateEmpty( + Context, Record[ASTStmtReader::NumStmtFields], Empty); + break; + case STMT_OMP_PARALLEL_SECTIONS_DIRECTIVE: S = OMPParallelSectionsDirective::CreateEmpty( Context, Record[ASTStmtReader::NumStmtFields], Empty); diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp index e66db435344..2b331a97985 100644 --- a/clang/lib/Serialization/ASTWriterStmt.cpp +++ b/clang/lib/Serialization/ASTWriterStmt.cpp @@ -2103,6 +2103,14 @@ void ASTStmtWriter::VisitOMPParallelForSimdDirective( Code = serialization::STMT_OMP_PARALLEL_FOR_SIMD_DIRECTIVE; } +void ASTStmtWriter::VisitOMPParallelMasterDirective( + OMPParallelMasterDirective *D) { + VisitStmt(D); + Record.push_back(D->getNumClauses()); + VisitOMPExecutableDirective(D); + Code = serialization::STMT_OMP_PARALLEL_MASTER_DIRECTIVE; +} + void ASTStmtWriter::VisitOMPParallelSectionsDirective( OMPParallelSectionsDirective *D) { VisitStmt(D); |

