diff options
author | Alexander Musman <alexander.musman@gmail.com> | 2014-05-27 15:12:19 +0000 |
---|---|---|
committer | Alexander Musman <alexander.musman@gmail.com> | 2014-05-27 15:12:19 +0000 |
commit | 8bd31e69a441bb7178134de57bc60c22be8e0f3c (patch) | |
tree | 03c7c30a004a5d9aa29ba6ec4ad5ba26d832ef2a /clang/lib/Parse/ParseOpenMP.cpp | |
parent | b355e8f604d3b26f15990b478a126b254a0fd9b8 (diff) | |
download | bcm5719-llvm-8bd31e69a441bb7178134de57bc60c22be8e0f3c.tar.gz bcm5719-llvm-8bd31e69a441bb7178134de57bc60c22be8e0f3c.zip |
Parsing/Sema for OMPCollapseClause.
Actual usage in Sema for collapsing loops will in some future patch.
llvm-svn: 209660
Diffstat (limited to 'clang/lib/Parse/ParseOpenMP.cpp')
-rw-r--r-- | clang/lib/Parse/ParseOpenMP.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp index dfd8ca7c2c9..5916098ab1c 100644 --- a/clang/lib/Parse/ParseOpenMP.cpp +++ b/clang/lib/Parse/ParseOpenMP.cpp @@ -257,7 +257,8 @@ bool Parser::ParseOpenMPSimpleVarList(OpenMPDirectiveKind Kind, /// /// clause: /// if-clause | num_threads-clause | safelen-clause | default-clause | -/// private-clause | firstprivate-clause | shared-clause | linear-clause +/// private-clause | firstprivate-clause | shared-clause | linear-clause | +/// collapse-clause /// OMPClause *Parser::ParseOpenMPClause(OpenMPDirectiveKind DKind, OpenMPClauseKind CKind, bool FirstClause) { @@ -274,11 +275,13 @@ OMPClause *Parser::ParseOpenMPClause(OpenMPDirectiveKind DKind, case OMPC_if: case OMPC_num_threads: case OMPC_safelen: + case OMPC_collapse: // OpenMP [2.5, Restrictions] // At most one if clause can appear on the directive. // At most one num_threads clause can appear on the directive. // OpenMP [2.8.1, simd construct, Restrictions] - // Only one safelen clause can appear on a simd directive. + // Only one safelen clause can appear on a simd directive. + // Only one collapse clause can appear on a simd directive. if (!FirstClause) { Diag(Tok, diag::err_omp_more_one_clause) << getOpenMPDirectiveName(DKind) << getOpenMPClauseName(CKind); @@ -334,6 +337,9 @@ OMPClause *Parser::ParseOpenMPClause(OpenMPDirectiveKind DKind, /// safelen-clause: /// 'safelen' '(' expression ')' /// +/// collapse-clause: +/// 'collapse' '(' expression ')' +/// OMPClause *Parser::ParseOpenMPSingleExprClause(OpenMPClauseKind Kind) { SourceLocation Loc = ConsumeToken(); |