diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2015-12-28 07:25:51 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-12-28 07:25:51 +0000 |
commit | 6402bcad714d776a9ee2e6d427e0dfb363915032 (patch) | |
tree | 571204e42c6d32b251c44b528eb2f92630a33fa7 /clang/lib/AST/StmtPrinter.cpp | |
parent | 401675ce5b6231606b1333fa0d228a440b1e747d (diff) | |
download | bcm5719-llvm-6402bcad714d776a9ee2e6d427e0dfb363915032.tar.gz bcm5719-llvm-6402bcad714d776a9ee2e6d427e0dfb363915032.zip |
[OPENMP 4.5] Sema/parsing support for extended format of 'schedule' clause.
OpenMP 4.0-3.1 supports the next format of ‘schedule’ clause: schedule(kind[, chunk_size])
Where kind can be one of ‘static’, ‘dynamic’, ‘guided’, ‘auto’ or ‘runtime’.
OpenMP 4.5 defines the format: schedule([modifier [, modifier]:]kind[, chunk_size])
Modifier can be one of ‘monotonic’, ‘nonmonotonic’ or ‘simd’.
llvm-svn: 256487
Diffstat (limited to 'clang/lib/AST/StmtPrinter.cpp')
-rw-r--r-- | clang/lib/AST/StmtPrinter.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp index fb63620deb9..7706d0e8f8d 100644 --- a/clang/lib/AST/StmtPrinter.cpp +++ b/clang/lib/AST/StmtPrinter.cpp @@ -651,8 +651,18 @@ void OMPClausePrinter::VisitOMPProcBindClause(OMPProcBindClause *Node) { } void OMPClausePrinter::VisitOMPScheduleClause(OMPScheduleClause *Node) { - OS << "schedule(" - << getOpenMPSimpleClauseTypeName(OMPC_schedule, Node->getScheduleKind()); + OS << "schedule("; + if (Node->getFirstScheduleModifier() != OMPC_SCHEDULE_MODIFIER_unknown) { + OS << getOpenMPSimpleClauseTypeName(OMPC_schedule, + Node->getFirstScheduleModifier()); + if (Node->getSecondScheduleModifier() != OMPC_SCHEDULE_MODIFIER_unknown) { + OS << ", "; + OS << getOpenMPSimpleClauseTypeName(OMPC_schedule, + Node->getSecondScheduleModifier()); + } + OS << ": "; + } + OS << getOpenMPSimpleClauseTypeName(OMPC_schedule, Node->getScheduleKind()); if (Node->getChunkSize()) { OS << ", "; Node->getChunkSize()->printPretty(OS, nullptr, Policy); |