summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseOpenMP.cpp
diff options
context:
space:
mode:
authorKelvin Li <kkwli0@gmail.com>2015-11-27 18:47:36 +0000
committerKelvin Li <kkwli0@gmail.com>2015-11-27 18:47:36 +0000
commita15fb1a1105b08e6a43993a0e48e92475b4edbbd (patch)
tree9fa4d1e05463c3662f107c46b60a3f19cf7c768a /clang/lib/Parse/ParseOpenMP.cpp
parentd08cb6c5283a26d7b2fda44e234b1c814426a3f8 (diff)
downloadbcm5719-llvm-a15fb1a1105b08e6a43993a0e48e92475b4edbbd.tar.gz
bcm5719-llvm-a15fb1a1105b08e6a43993a0e48e92475b4edbbd.zip
[OpenMP] Parsing and sema support for thread_limit clause.
http://reviews.llvm.org/D15029 llvm-svn: 254207
Diffstat (limited to 'clang/lib/Parse/ParseOpenMP.cpp')
-rw-r--r--clang/lib/Parse/ParseOpenMP.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp
index f9ca1185d94..cf108011129 100644
--- a/clang/lib/Parse/ParseOpenMP.cpp
+++ b/clang/lib/Parse/ParseOpenMP.cpp
@@ -394,7 +394,8 @@ bool Parser::ParseOpenMPSimpleVarList(OpenMPDirectiveKind Kind,
/// schedule-clause | copyin-clause | copyprivate-clause | untied-clause |
/// mergeable-clause | flush-clause | read-clause | write-clause |
/// update-clause | capture-clause | seq_cst-clause | device-clause |
-/// simdlen-clause | threads-clause | simd-clause | num_teams-clause
+/// simdlen-clause | threads-clause | simd-clause | num_teams-clause |
+/// thread_limit-clause
///
OMPClause *Parser::ParseOpenMPClause(OpenMPDirectiveKind DKind,
OpenMPClauseKind CKind, bool FirstClause) {
@@ -416,6 +417,7 @@ OMPClause *Parser::ParseOpenMPClause(OpenMPDirectiveKind DKind,
case OMPC_ordered:
case OMPC_device:
case OMPC_num_teams:
+ case OMPC_thread_limit:
// OpenMP [2.5, Restrictions]
// At most one num_threads clause can appear on the directive.
// OpenMP [2.8.1, simd construct, Restrictions]
@@ -429,6 +431,7 @@ OMPClause *Parser::ParseOpenMPClause(OpenMPDirectiveKind DKind,
// At most one final clause can appear on the directive.
// OpenMP [teams Construct, Restrictions]
// At most one num_teams clause can appear on the directive.
+ // At most one thread_limit clause can appear on the directive.
if (!FirstClause) {
Diag(Tok, diag::err_omp_more_one_clause)
<< getOpenMPDirectiveName(DKind) << getOpenMPClauseName(CKind) << 0;
OpenPOWER on IntegriCloud