From e955b3d3fe12a05e7639aa336d6945fa9427c0dc Mon Sep 17 00:00:00 2001 From: Arpith Chacko Jacob Date: Tue, 26 Jan 2016 18:48:41 +0000 Subject: [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 --- clang/lib/Basic/OpenMPKinds.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'clang/lib/Basic/OpenMPKinds.cpp') 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 @@ -450,6 +450,16 @@ bool clang::isAllowedClauseForDirective(OpenMPDirectiveKind DKind, #define OPENMP_TARGET_EXIT_DATA_CLAUSE(Name) \ case OMPC_##Name: \ return true; +#include "clang/Basic/OpenMPKinds.def" + default: + 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; @@ -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) { -- cgit v1.2.3