diff options
| author | Alexey Bataev <a.bataev@hotmail.com> | 2014-06-20 07:16:17 +0000 |
|---|---|---|
| committer | Alexey Bataev <a.bataev@hotmail.com> | 2014-06-20 07:16:17 +0000 |
| commit | 56dafe87c287f24f3640a3d969a3598d661256bd (patch) | |
| tree | 0b4e09b3964bbc1f63c3087c5e2193cdaf91b834 /clang/lib/Serialization | |
| parent | f5e2997affd04c404042f9a6e35cf86997a2ad84 (diff) | |
| download | bcm5719-llvm-56dafe87c287f24f3640a3d969a3598d661256bd.tar.gz bcm5719-llvm-56dafe87c287f24f3640a3d969a3598d661256bd.zip | |
[OPENMP] Initial support for 'schedule' clause.
llvm-svn: 211342
Diffstat (limited to 'clang/lib/Serialization')
| -rw-r--r-- | clang/lib/Serialization/ASTReaderStmt.cpp | 12 | ||||
| -rw-r--r-- | clang/lib/Serialization/ASTWriterStmt.cpp | 8 |
2 files changed, 20 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTReaderStmt.cpp b/clang/lib/Serialization/ASTReaderStmt.cpp index 708c7f3866d..cda835597f1 100644 --- a/clang/lib/Serialization/ASTReaderStmt.cpp +++ b/clang/lib/Serialization/ASTReaderStmt.cpp @@ -1691,6 +1691,9 @@ OMPClause *OMPClauseReader::readClause() { case OMPC_proc_bind: C = new (Context) OMPProcBindClause(); break; + case OMPC_schedule: + C = new (Context) OMPScheduleClause(); + break; case OMPC_private: C = OMPPrivateClause::CreateEmpty(Context, Record[Idx++]); break; @@ -1757,6 +1760,15 @@ void OMPClauseReader::VisitOMPProcBindClause(OMPProcBindClause *C) { C->setProcBindKindKwLoc(Reader->ReadSourceLocation(Record, Idx)); } +void OMPClauseReader::VisitOMPScheduleClause(OMPScheduleClause *C) { + C->setScheduleKind( + static_cast<OpenMPScheduleClauseKind>(Record[Idx++])); + C->setChunkSize(Reader->Reader.ReadSubExpr()); + C->setLParenLoc(Reader->ReadSourceLocation(Record, Idx)); + C->setScheduleKindLoc(Reader->ReadSourceLocation(Record, Idx)); + C->setCommaLoc(Reader->ReadSourceLocation(Record, Idx)); +} + void OMPClauseReader::VisitOMPPrivateClause(OMPPrivateClause *C) { C->setLParenLoc(Reader->ReadSourceLocation(Record, Idx)); unsigned NumVars = C->varlist_size(); diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp index fb8d14b861b..0de9221c73e 100644 --- a/clang/lib/Serialization/ASTWriterStmt.cpp +++ b/clang/lib/Serialization/ASTWriterStmt.cpp @@ -1707,6 +1707,14 @@ void OMPClauseWriter::VisitOMPProcBindClause(OMPProcBindClause *C) { Writer->Writer.AddSourceLocation(C->getProcBindKindKwLoc(), Record); } +void OMPClauseWriter::VisitOMPScheduleClause(OMPScheduleClause *C) { + Record.push_back(C->getScheduleKind()); + Writer->Writer.AddStmt(C->getChunkSize()); + Writer->Writer.AddSourceLocation(C->getLParenLoc(), Record); + Writer->Writer.AddSourceLocation(C->getScheduleKindLoc(), Record); + Writer->Writer.AddSourceLocation(C->getCommaLoc(), Record); +} + void OMPClauseWriter::VisitOMPPrivateClause(OMPPrivateClause *C) { Record.push_back(C->varlist_size()); Writer->Writer.AddSourceLocation(C->getLParenLoc(), Record); |

