diff options
| author | cchen <cchen@cray.com> | 2019-12-04 14:36:07 -0500 |
|---|---|---|
| committer | Alexey Bataev <a.bataev@hotmail.com> | 2019-12-04 14:53:17 -0500 |
| commit | 713dab21e27c987b9114547ce7136bac2e775de9 (patch) | |
| tree | 696ff853d8c9db4fab6b73fbfcab6de0c4185d0d /clang/lib/Serialization | |
| parent | 9e978bb01ceae8eaa415d8951cc96803e68b73fb (diff) | |
| download | bcm5719-llvm-713dab21e27c987b9114547ce7136bac2e775de9.tar.gz bcm5719-llvm-713dab21e27c987b9114547ce7136bac2e775de9.zip | |
[OpenMP50] Add parallel master construct, by Chi Chun Chen.
Reviewers: ABataev, jdoerfert
Reviewed By: ABataev
Subscribers: 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); |

