summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseOpenMP.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2015-12-03 09:40:15 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2015-12-03 09:40:15 +0000
commit0a6ed84a0d2f3c7c5aeb9d6b702ac127613d2b1b (patch)
treeb620bf6989da38a339fe426f1388412a9ce456fd /clang/lib/Parse/ParseOpenMP.cpp
parent830dfccfb2c06a1749938ce8cb78a1d6a295b942 (diff)
downloadbcm5719-llvm-0a6ed84a0d2f3c7c5aeb9d6b702ac127613d2b1b.tar.gz
bcm5719-llvm-0a6ed84a0d2f3c7c5aeb9d6b702ac127613d2b1b.zip
[OPENMP 4.5] Parsing/sema support for 'omp taskloop simd' directive.
OpenMP 4.5 adds directive 'taskloop simd'. Patch adds parsing/sema analysis for 'taskloop simd' directive and its clauses. llvm-svn: 254597
Diffstat (limited to 'clang/lib/Parse/ParseOpenMP.cpp')
-rw-r--r--clang/lib/Parse/ParseOpenMP.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp
index 5991a28d0c0..3d78673d289 100644
--- a/clang/lib/Parse/ParseOpenMP.cpp
+++ b/clang/lib/Parse/ParseOpenMP.cpp
@@ -37,7 +37,8 @@ static OpenMPDirectiveKind ParseOpenMPDirectiveKind(Parser &P) {
{OMPD_for, OMPD_simd, OMPD_for_simd},
{OMPD_parallel, OMPD_for, OMPD_parallel_for},
{OMPD_parallel_for, OMPD_simd, OMPD_parallel_for_simd},
- {OMPD_parallel, OMPD_sections, OMPD_parallel_sections}};
+ {OMPD_parallel, OMPD_sections, OMPD_parallel_sections},
+ {OMPD_taskloop, OMPD_simd, OMPD_taskloop_simd}};
auto Tok = P.getCurToken();
auto DKind =
Tok.isAnnotation()
@@ -138,6 +139,7 @@ Parser::DeclGroupPtrTy Parser::ParseOpenMPDeclarativeDirective() {
case OMPD_cancel:
case OMPD_target_data:
case OMPD_taskloop:
+ case OMPD_taskloop_simd:
Diag(Tok, diag::err_omp_unexpected_directive)
<< getOpenMPDirectiveName(DKind);
break;
@@ -158,7 +160,7 @@ Parser::DeclGroupPtrTy Parser::ParseOpenMPDeclarativeDirective() {
/// 'parallel for' | 'parallel sections' | 'task' | 'taskyield' |
/// 'barrier' | 'taskwait' | 'flush' | 'ordered' | 'atomic' |
/// 'for simd' | 'parallel for simd' | 'target' | 'target data' |
-/// 'taskgroup' | 'teams' {clause}
+/// 'taskgroup' | 'teams' | 'taskloop' | 'taskloop simd' {clause}
/// annot_pragma_openmp_end
///
StmtResult
@@ -234,7 +236,8 @@ Parser::ParseOpenMPDeclarativeOrExecutableDirective(bool StandAloneAllowed) {
case OMPD_teams:
case OMPD_taskgroup:
case OMPD_target_data:
- case OMPD_taskloop: {
+ case OMPD_taskloop:
+ case OMPD_taskloop_simd: {
ConsumeToken();
// Parse directive name of the 'critical' directive if any.
if (DKind == OMPD_critical) {
OpenPOWER on IntegriCloud