diff options
author | Arpith Chacko Jacob <acjacob@us.ibm.com> | 2016-01-26 18:48:41 +0000 |
---|---|---|
committer | Arpith Chacko Jacob <acjacob@us.ibm.com> | 2016-01-26 18:48:41 +0000 |
commit | e955b3d3fe12a05e7639aa336d6945fa9427c0dc (patch) | |
tree | 3423de8c95bccda8edcb7065c05cd525a8acc621 /clang/lib/Basic/OpenMPKinds.cpp | |
parent | 6ac3f739ca4cd90b41388cc50070a6bca85b6842 (diff) | |
download | bcm5719-llvm-e955b3d3fe12a05e7639aa336d6945fa9427c0dc.tar.gz bcm5719-llvm-e955b3d3fe12a05e7639aa336d6945fa9427c0dc.zip |
[OpenMP] Parsing + sema for target parallel directive.
Summary:
This patch adds parsing + sema for the target parallel directive and its clauses along with testcases.
Reviewers: ABataev
Differential Revision: http://reviews.llvm.org/D16553
Rebased to current trunk and updated test cases.
llvm-svn: 258832
Diffstat (limited to 'clang/lib/Basic/OpenMPKinds.cpp')
-rw-r--r-- | clang/lib/Basic/OpenMPKinds.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/clang/lib/Basic/OpenMPKinds.cpp b/clang/lib/Basic/OpenMPKinds.cpp index dec6524d461..e66a3e331e6 100644 --- a/clang/lib/Basic/OpenMPKinds.cpp +++ b/clang/lib/Basic/OpenMPKinds.cpp @@ -455,6 +455,16 @@ bool clang::isAllowedClauseForDirective(OpenMPDirectiveKind DKind, break; } break; + case OMPD_target_parallel: + switch (CKind) { +#define OPENMP_TARGET_PARALLEL_CLAUSE(Name) \ + case OMPC_##Name: \ + return true; +#include "clang/Basic/OpenMPKinds.def" + default: + break; + } + break; case OMPD_teams: switch (CKind) { #define OPENMP_TEAMS_CLAUSE(Name) \ @@ -562,7 +572,8 @@ bool clang::isOpenMPTaskLoopDirective(OpenMPDirectiveKind DKind) { bool clang::isOpenMPParallelDirective(OpenMPDirectiveKind DKind) { return DKind == OMPD_parallel || DKind == OMPD_parallel_for || DKind == OMPD_parallel_for_simd || - DKind == OMPD_parallel_sections; // TODO add next directives. + DKind == OMPD_parallel_sections || DKind == OMPD_target_parallel; + // TODO add next directives. } bool clang::isOpenMPTargetDirective(OpenMPDirectiveKind DKind) { |