diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2015-07-30 11:36:16 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-07-30 11:36:16 +0000 |
commit | 10e775f4a882ec49e374bbeca567e91547d78312 (patch) | |
tree | cced55f964fdfb8e5d538d246c1ec312c6356912 /clang/lib/AST/StmtPrinter.cpp | |
parent | 3cc4a250a6a4c533097ce1e1ff272d07c30b0465 (diff) | |
download | bcm5719-llvm-10e775f4a882ec49e374bbeca567e91547d78312.tar.gz bcm5719-llvm-10e775f4a882ec49e374bbeca567e91547d78312.zip |
[OPENMP 4.1] Initial support for extended 'ordered' clause.
OpenMP 4.1 introduces optional argument '(n)' for 'ordered' clause, where 'n' is a number of loops that immediately follow the directive.
'n' must be constant positive integer expressions and it must be less or equal than the number of the loops in the resulting loop nest.
Patch adds parsing and semantic analysis for this optional argument.
llvm-svn: 243635
Diffstat (limited to 'clang/lib/AST/StmtPrinter.cpp')
-rw-r--r-- | clang/lib/AST/StmtPrinter.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp index 30f15e037ba..57187ca8620 100644 --- a/clang/lib/AST/StmtPrinter.cpp +++ b/clang/lib/AST/StmtPrinter.cpp @@ -651,8 +651,13 @@ void OMPClausePrinter::VisitOMPScheduleClause(OMPScheduleClause *Node) { OS << ")"; } -void OMPClausePrinter::VisitOMPOrderedClause(OMPOrderedClause *) { +void OMPClausePrinter::VisitOMPOrderedClause(OMPOrderedClause *Node) { OS << "ordered"; + if (auto *Num = Node->getNumForLoops()) { + OS << "("; + Num->printPretty(OS, nullptr, Policy, 0); + OS << ")"; + } } void OMPClausePrinter::VisitOMPNowaitClause(OMPNowaitClause *) { |