diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2014-03-21 04:51:18 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2014-03-21 04:51:18 +0000 |
commit | 62c87d2509bca87ee544e2148c231cb7c0978fef (patch) | |
tree | 05789900cfe4125c2afd9512e262c30a098cc405 /clang/lib/Parse/ParseOpenMP.cpp | |
parent | db55b02e1ce9e192f22ac43df6d1b52c536d0eaf (diff) | |
download | bcm5719-llvm-62c87d2509bca87ee544e2148c231cb7c0978fef.tar.gz bcm5719-llvm-62c87d2509bca87ee544e2148c231cb7c0978fef.zip |
[OPENMP] parsing of clause 'safelen' (for directive 'omp simd')
llvm-svn: 204428
Diffstat (limited to 'clang/lib/Parse/ParseOpenMP.cpp')
-rw-r--r-- | clang/lib/Parse/ParseOpenMP.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp index 037dd36fc77..fa55b44da7e 100644 --- a/clang/lib/Parse/ParseOpenMP.cpp +++ b/clang/lib/Parse/ParseOpenMP.cpp @@ -257,7 +257,8 @@ bool Parser::ParseOpenMPSimpleVarList(OpenMPDirectiveKind Kind, /// \brief Parsing of OpenMP clauses. /// /// clause: -/// default-clause|private-clause|firstprivate-clause|shared-clause +/// if-clause | num_threads-clause | safelen-clause | default-clause | +/// private-clause | firstprivate-clause | shared-clause /// OMPClause *Parser::ParseOpenMPClause(OpenMPDirectiveKind DKind, OpenMPClauseKind CKind, bool FirstClause) { @@ -273,9 +274,12 @@ OMPClause *Parser::ParseOpenMPClause(OpenMPDirectiveKind DKind, switch (CKind) { case OMPC_if: case OMPC_num_threads: + case OMPC_safelen: // 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. if (!FirstClause) { Diag(Tok, diag::err_omp_more_one_clause) << getOpenMPDirectiveName(DKind) << getOpenMPClauseName(CKind); @@ -321,6 +325,12 @@ OMPClause *Parser::ParseOpenMPClause(OpenMPDirectiveKind DKind, /// if-clause: /// 'if' '(' expression ')' /// +/// num_threads-clause: +/// 'num_threads' '(' expression ')' +/// +/// safelen-clause: +/// 'safelen' '(' expression ')' +/// OMPClause *Parser::ParseOpenMPSingleExprClause(OpenMPClauseKind Kind) { SourceLocation Loc = ConsumeToken(); |