[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
diff --git a/clang/lib/Basic/OpenMPKinds.cpp b/clang/lib/Basic/OpenMPKinds.cpp
index dec6524..e66a3e3 100644
--- a/clang/lib/Basic/OpenMPKinds.cpp
+++ b/clang/lib/Basic/OpenMPKinds.cpp
@@ -455,6 +455,16 @@
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::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) {