summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
diff options
context:
space:
mode:
authorCarlo Bertolli <cbertol@us.ibm.com>2015-12-08 04:21:03 +0000
committerCarlo Bertolli <cbertol@us.ibm.com>2015-12-08 04:21:03 +0000
commitb9bfa75b28506be4d81ae65409565c958be45f2b (patch)
tree167475e4a6f05911bc1c90729e83dce8dcb69f00 /clang/lib/Basic
parent8da1f95916588922dd3ef277602aa93891106902 (diff)
downloadbcm5719-llvm-b9bfa75b28506be4d81ae65409565c958be45f2b.tar.gz
bcm5719-llvm-b9bfa75b28506be4d81ae65409565c958be45f2b.zip
Add parse and sema for OpenMP distribute directive and all its clauses excluding dist_schedule.
llvm-svn: 255001
Diffstat (limited to 'clang/lib/Basic')
-rw-r--r--clang/lib/Basic/OpenMPKinds.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/clang/lib/Basic/OpenMPKinds.cpp b/clang/lib/Basic/OpenMPKinds.cpp
index 4c4d151640f..7e3156ec2c2 100644
--- a/clang/lib/Basic/OpenMPKinds.cpp
+++ b/clang/lib/Basic/OpenMPKinds.cpp
@@ -436,6 +436,16 @@ bool clang::isAllowedClauseForDirective(OpenMPDirectiveKind DKind,
break;
}
break;
+ case OMPD_distribute:
+ switch (CKind) {
+#define OPENMP_DISTRIBUTE_CLAUSE(Name) \
+ case OMPC_##Name: \
+ return true;
+#include "clang/Basic/OpenMPKinds.def"
+ default:
+ break;
+ }
+ break;
case OMPD_unknown:
case OMPD_threadprivate:
case OMPD_section:
@@ -455,7 +465,8 @@ bool clang::isOpenMPLoopDirective(OpenMPDirectiveKind DKind) {
return DKind == OMPD_simd || DKind == OMPD_for || DKind == OMPD_for_simd ||
DKind == OMPD_parallel_for || DKind == OMPD_parallel_for_simd ||
DKind == OMPD_taskloop ||
- DKind == OMPD_taskloop_simd; // TODO add next directives.
+ DKind == OMPD_taskloop_simd ||
+ DKind == OMPD_distribute; // TODO add next directives.
}
bool clang::isOpenMPWorksharingDirective(OpenMPDirectiveKind DKind) {
@@ -490,6 +501,10 @@ bool clang::isOpenMPSimdDirective(OpenMPDirectiveKind DKind) {
DKind == OMPD_taskloop_simd; // TODO add next directives.
}
+bool clang::isOpenMPDistributeDirective(OpenMPDirectiveKind Kind) {
+ return Kind == OMPD_distribute; // TODO add next directives.
+}
+
bool clang::isOpenMPPrivate(OpenMPClauseKind Kind) {
return Kind == OMPC_private || Kind == OMPC_firstprivate ||
Kind == OMPC_lastprivate || Kind == OMPC_linear ||
OpenPOWER on IntegriCloud