[llvm-branch-commits] [llvm] 2a636ff - [OpenMP][NFC] Move and simplify directive -> allowed clause mapping

Johannes Doerfert via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Apr 3 23:58:40 PDT 2020


Author: Johannes Doerfert
Date: 2020-04-04T00:27:07-05:00
New Revision: 2a636ffac1a7d92754cd323b5ba43e7b3a14a5d5

URL: https://github.com/llvm/llvm-project/commit/2a636ffac1a7d92754cd323b5ba43e7b3a14a5d5
DIFF: https://github.com/llvm/llvm-project/commit/2a636ffac1a7d92754cd323b5ba43e7b3a14a5d5.diff

LOG: [OpenMP][NFC] Move and simplify directive -> allowed clause mapping

Summary:
Move the listing of allowed clauses per OpenMP directive to the new
macro file in `llvm/Frontend/OpenMP`. Also, use a single generic macro
that specifies the directive and one allowed clause explicitly instead
of a dedicated macro per directive.

We save 800 loc and boilerplate for all new directives/clauses with no
functional change. We also need to include the macro file only once and
not once per directive.

Depends on D77112.

Reviewers: lebedev.ri, JonChesterfield, ABataev

Subscribers: hiraditya, bollu, guansong, jfb, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D77113

Added: 
    

Modified: 
    clang/include/clang/ASTMatchers/ASTMatchers.h
    clang/include/clang/Basic/OpenMPKinds.def
    clang/include/clang/Basic/OpenMPKinds.h
    clang/lib/ASTMatchers/Dynamic/CMakeLists.txt
    clang/lib/Basic/OpenMPKinds.cpp
    clang/lib/Tooling/CMakeLists.txt
    clang/lib/Tooling/Transformer/CMakeLists.txt
    clang/unittests/AST/CMakeLists.txt
    clang/unittests/ASTMatchers/CMakeLists.txt
    clang/unittests/ASTMatchers/Dynamic/CMakeLists.txt
    clang/unittests/Analysis/CMakeLists.txt
    clang/unittests/Rename/CMakeLists.txt
    clang/unittests/Sema/CMakeLists.txt
    clang/unittests/StaticAnalyzer/CMakeLists.txt
    clang/unittests/Tooling/CMakeLists.txt
    llvm/include/llvm/Frontend/OpenMP/OMPConstants.h
    llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
    llvm/lib/Frontend/OpenMP/OMPConstants.cpp

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/ASTMatchers/ASTMatchers.h b/clang/include/clang/ASTMatchers/ASTMatchers.h
index 8d97c32a0d36..9d7b4dcaacfd 100644
--- a/clang/include/clang/ASTMatchers/ASTMatchers.h
+++ b/clang/include/clang/ASTMatchers/ASTMatchers.h
@@ -7119,7 +7119,7 @@ AST_MATCHER(OMPDefaultClause, isSharedKind) {
 /// ``isAllowedToContainClauseKind("OMPC_default").``
 AST_MATCHER_P(OMPExecutableDirective, isAllowedToContainClauseKind,
               OpenMPClauseKind, CKind) {
-  return isAllowedClauseForDirective(
+  return llvm::omp::isAllowedClauseForDirective(
       Node.getDirectiveKind(), CKind,
       Finder->getASTContext().getLangOpts().OpenMP);
 }

diff  --git a/clang/include/clang/Basic/OpenMPKinds.def b/clang/include/clang/Basic/OpenMPKinds.def
index 4a4e6c6cb4c3..0ae0bc844e36 100644
--- a/clang/include/clang/Basic/OpenMPKinds.def
+++ b/clang/include/clang/Basic/OpenMPKinds.def
@@ -11,102 +11,6 @@
 ///
 //===----------------------------------------------------------------------===//
 
-#ifndef OPENMP_CLAUSE
-#  define OPENMP_CLAUSE(Name, Class)
-#endif
-#ifndef OPENMP_PARALLEL_CLAUSE
-#  define OPENMP_PARALLEL_CLAUSE(Name)
-#endif
-#ifndef OPENMP_SIMD_CLAUSE
-#  define OPENMP_SIMD_CLAUSE(Name)
-#endif
-#ifndef OPENMP_FOR_CLAUSE
-#  define OPENMP_FOR_CLAUSE(Name)
-#endif
-#ifndef OPENMP_FOR_SIMD_CLAUSE
-#  define OPENMP_FOR_SIMD_CLAUSE(Name)
-#endif
-#ifndef OPENMP_SECTIONS_CLAUSE
-#  define OPENMP_SECTIONS_CLAUSE(Name)
-#endif
-#ifndef OPENMP_SINGLE_CLAUSE
-#  define OPENMP_SINGLE_CLAUSE(Name)
-#endif
-#ifndef OPENMP_PARALLEL_FOR_CLAUSE
-#  define OPENMP_PARALLEL_FOR_CLAUSE(Name)
-#endif
-#ifndef OPENMP_PARALLEL_FOR_SIMD_CLAUSE
-#  define OPENMP_PARALLEL_FOR_SIMD_CLAUSE(Name)
-#endif
-#ifndef OPENMP_PARALLEL_MASTER_CLAUSE
-#  define OPENMP_PARALLEL_MASTER_CLAUSE(Name)
-#endif
-#ifndef OPENMP_PARALLEL_SECTIONS_CLAUSE
-#  define OPENMP_PARALLEL_SECTIONS_CLAUSE(Name)
-#endif
-#ifndef OPENMP_TASK_CLAUSE
-#  define OPENMP_TASK_CLAUSE(Name)
-#endif
-#ifndef OPENMP_ATOMIC_CLAUSE
-#  define OPENMP_ATOMIC_CLAUSE(Name)
-#endif
-#ifndef OPENMP_TARGET_CLAUSE
-#  define OPENMP_TARGET_CLAUSE(Name)
-#endif
-#ifndef OPENMP_REQUIRES_CLAUSE
-# define OPENMP_REQUIRES_CLAUSE(Name)
-#endif
-#ifndef OPENMP_TARGET_DATA_CLAUSE
-#  define OPENMP_TARGET_DATA_CLAUSE(Name)
-#endif
-#ifndef OPENMP_TARGET_ENTER_DATA_CLAUSE
-#define OPENMP_TARGET_ENTER_DATA_CLAUSE(Name)
-#endif
-#ifndef OPENMP_TARGET_EXIT_DATA_CLAUSE
-#define OPENMP_TARGET_EXIT_DATA_CLAUSE(Name)
-#endif
-#ifndef OPENMP_TARGET_PARALLEL_CLAUSE
-#  define OPENMP_TARGET_PARALLEL_CLAUSE(Name)
-#endif
-#ifndef OPENMP_TARGET_PARALLEL_FOR_CLAUSE
-#  define OPENMP_TARGET_PARALLEL_FOR_CLAUSE(Name)
-#endif
-#ifndef OPENMP_TARGET_UPDATE_CLAUSE
-#  define OPENMP_TARGET_UPDATE_CLAUSE(Name)
-#endif
-#ifndef OPENMP_TEAMS_CLAUSE
-#  define OPENMP_TEAMS_CLAUSE(Name)
-#endif
-#ifndef OPENMP_CANCEL_CLAUSE
-#  define OPENMP_CANCEL_CLAUSE(Name)
-#endif
-#ifndef OPENMP_ORDERED_CLAUSE
-#  define OPENMP_ORDERED_CLAUSE(Name)
-#endif
-#ifndef OPENMP_TASKLOOP_CLAUSE
-#  define OPENMP_TASKLOOP_CLAUSE(Name)
-#endif
-#ifndef OPENMP_TASKLOOP_SIMD_CLAUSE
-#  define OPENMP_TASKLOOP_SIMD_CLAUSE(Name)
-#endif
-#ifndef OPENMP_MASTER_TASKLOOP_CLAUSE
-#  define OPENMP_MASTER_TASKLOOP_CLAUSE(Name)
-#endif
-#ifndef OPENMP_MASTER_TASKLOOP_SIMD_CLAUSE
-#  define OPENMP_MASTER_TASKLOOP_SIMD_CLAUSE(Name)
-#endif
-#ifndef OPENMP_PARALLEL_MASTER_TASKLOOP_CLAUSE
-#  define OPENMP_PARALLEL_MASTER_TASKLOOP_CLAUSE(Name)
-#endif
-#ifndef OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE
-#  define OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE(Name)
-#endif
-#ifndef OPENMP_CRITICAL_CLAUSE
-#  define OPENMP_CRITICAL_CLAUSE(Name)
-#endif
-#ifndef OPENMP_DISTRIBUTE_CLAUSE
-#define OPENMP_DISTRIBUTE_CLAUSE(Name)
-#endif
 #ifndef OPENMP_SCHEDULE_KIND
 #define OPENMP_SCHEDULE_KIND(Name)
 #endif
@@ -143,164 +47,22 @@
 #ifndef OPENMP_DEFAULTMAP_MODIFIER
 #define OPENMP_DEFAULTMAP_MODIFIER(Name)
 #endif
-#ifndef OPENMP_DISTRIBUTE_PARALLEL_FOR_CLAUSE
-#define OPENMP_DISTRIBUTE_PARALLEL_FOR_CLAUSE(Name)
-#endif
-#ifndef OPENMP_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE
-#define OPENMP_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(Name)
-#endif
-#ifndef OPENMP_DISTRIBUTE_SIMD_CLAUSE
-#define OPENMP_DISTRIBUTE_SIMD_CLAUSE(Name)
-#endif
-#ifndef OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE
-#define OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE(Name)
-#endif
-#ifndef OPENMP_TARGET_SIMD_CLAUSE
-#define OPENMP_TARGET_SIMD_CLAUSE(Name)
-#endif
-#ifndef OPENMP_TEAMS_DISTRIBUTE_CLAUSE
-#define OPENMP_TEAMS_DISTRIBUTE_CLAUSE(Name)
-#endif
-#ifndef OPENMP_TEAMS_DISTRIBUTE_SIMD_CLAUSE
-#define OPENMP_TEAMS_DISTRIBUTE_SIMD_CLAUSE(Name)
-#endif
-#ifndef OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE
-#define OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(Name)
-#endif
-#ifndef OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE
-#define OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(Name)
-#endif
-#ifndef OPENMP_TARGET_TEAMS_CLAUSE
-#define OPENMP_TARGET_TEAMS_CLAUSE(Name)
-#endif
-#ifndef OPENMP_TARGET_TEAMS_DISTRIBUTE_CLAUSE
-#define OPENMP_TARGET_TEAMS_DISTRIBUTE_CLAUSE(Name)
-#endif
-#ifndef OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE
-#define OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(Name)
-#endif
-#ifndef OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE
-#define OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(Name)
-#endif
-#ifndef OPENMP_TARGET_TEAMS_DISTRIBUTE_SIMD_CLAUSE
-#define OPENMP_TARGET_TEAMS_DISTRIBUTE_SIMD_CLAUSE(Name)
-#endif
-#ifndef OPENMP_TASKGROUP_CLAUSE
-#define OPENMP_TASKGROUP_CLAUSE(Name)
-#endif
-#ifndef OPENMP_DECLARE_MAPPER_CLAUSE
-#define OPENMP_DECLARE_MAPPER_CLAUSE(Name)
-#endif
-#ifndef OPENMP_ALLOCATE_CLAUSE
-# define OPENMP_ALLOCATE_CLAUSE(Name)
-#endif
 #ifndef OPENMP_DEVICE_TYPE_KIND
 #define OPENMP_DEVICE_TYPE_KIND(Name)
 #endif
-#ifndef OPENMP_DECLARE_VARIANT_CLAUSE
-#define OPENMP_DECLARE_VARIANT_CLAUSE(Name)
-#endif
 #ifndef OPENMP_LASTPRIVATE_KIND
 #define OPENMP_LASTPRIVATE_KIND(Name)
 #endif
 #ifndef OPENMP_ORDER_KIND
 #define OPENMP_ORDER_KIND(Name)
 #endif
-#ifndef OPENMP_FLUSH_CLAUSE
-#define OPENMP_FLUSH_CLAUSE(Name)
-#endif
-#ifndef OPENMP_DEPOBJ_CLAUSE
-#define OPENMP_DEPOBJ_CLAUSE(Name)
-#endif
 #ifndef OPENMP_DEVICE_MODIFIER
 #define OPENMP_DEVICE_MODIFIER(Name)
 #endif
-#ifndef OPENMP_SCAN_CLAUSE
-#define OPENMP_SCAN_CLAUSE(Name)
-#endif
 #ifndef OPENMP_REDUCTION_MODIFIER
 #define OPENMP_REDUCTION_MODIFIER(Name)
 #endif
 
-// Clauses allowed for OpenMP directive 'scan'.
-OPENMP_SCAN_CLAUSE(inclusive)
-OPENMP_SCAN_CLAUSE(exclusive)
-
-// Clauses allowed for OpenMP directive 'parallel'.
-OPENMP_PARALLEL_CLAUSE(if)
-OPENMP_PARALLEL_CLAUSE(num_threads)
-OPENMP_PARALLEL_CLAUSE(default)
-OPENMP_PARALLEL_CLAUSE(proc_bind)
-OPENMP_PARALLEL_CLAUSE(private)
-OPENMP_PARALLEL_CLAUSE(firstprivate)
-OPENMP_PARALLEL_CLAUSE(shared)
-OPENMP_PARALLEL_CLAUSE(reduction)
-OPENMP_PARALLEL_CLAUSE(copyin)
-OPENMP_PARALLEL_CLAUSE(allocate)
-
-// Clauses allowed for directive 'omp simd'.
-OPENMP_SIMD_CLAUSE(private)
-OPENMP_SIMD_CLAUSE(lastprivate)
-OPENMP_SIMD_CLAUSE(linear)
-OPENMP_SIMD_CLAUSE(aligned)
-OPENMP_SIMD_CLAUSE(safelen)
-OPENMP_SIMD_CLAUSE(simdlen)
-OPENMP_SIMD_CLAUSE(collapse)
-OPENMP_SIMD_CLAUSE(reduction)
-OPENMP_SIMD_CLAUSE(allocate)
-OPENMP_SIMD_CLAUSE(if)
-OPENMP_SIMD_CLAUSE(nontemporal)
-OPENMP_SIMD_CLAUSE(order)
-
-// Clauses allowed for directive 'omp for'.
-OPENMP_FOR_CLAUSE(private)
-OPENMP_FOR_CLAUSE(lastprivate)
-OPENMP_FOR_CLAUSE(firstprivate)
-OPENMP_FOR_CLAUSE(reduction)
-OPENMP_FOR_CLAUSE(collapse)
-OPENMP_FOR_CLAUSE(schedule)
-OPENMP_FOR_CLAUSE(ordered)
-OPENMP_FOR_CLAUSE(nowait)
-OPENMP_FOR_CLAUSE(linear)
-OPENMP_FOR_CLAUSE(allocate)
-OPENMP_FOR_CLAUSE(order)
-
-// Clauses allowed for directive 'omp for simd'.
-OPENMP_FOR_SIMD_CLAUSE(private)
-OPENMP_FOR_SIMD_CLAUSE(firstprivate)
-OPENMP_FOR_SIMD_CLAUSE(lastprivate)
-OPENMP_FOR_SIMD_CLAUSE(reduction)
-OPENMP_FOR_SIMD_CLAUSE(schedule)
-OPENMP_FOR_SIMD_CLAUSE(collapse)
-OPENMP_FOR_SIMD_CLAUSE(nowait)
-OPENMP_FOR_SIMD_CLAUSE(safelen)
-OPENMP_FOR_SIMD_CLAUSE(simdlen)
-OPENMP_FOR_SIMD_CLAUSE(linear)
-OPENMP_FOR_SIMD_CLAUSE(aligned)
-OPENMP_FOR_SIMD_CLAUSE(ordered)
-OPENMP_FOR_SIMD_CLAUSE(allocate)
-OPENMP_FOR_SIMD_CLAUSE(if)
-OPENMP_FOR_SIMD_CLAUSE(nontemporal)
-OPENMP_FOR_SIMD_CLAUSE(order)
-
-// Clauses allowed for OpenMP directive 'omp sections'.
-OPENMP_SECTIONS_CLAUSE(private)
-OPENMP_SECTIONS_CLAUSE(lastprivate)
-OPENMP_SECTIONS_CLAUSE(firstprivate)
-OPENMP_SECTIONS_CLAUSE(reduction)
-OPENMP_SECTIONS_CLAUSE(nowait)
-OPENMP_SECTIONS_CLAUSE(allocate)
-
-// Clauses allowed for directive 'omp single'.
-OPENMP_SINGLE_CLAUSE(private)
-OPENMP_SINGLE_CLAUSE(firstprivate)
-OPENMP_SINGLE_CLAUSE(copyprivate)
-OPENMP_SINGLE_CLAUSE(nowait)
-OPENMP_SINGLE_CLAUSE(allocate)
-
-// Clauses allowed for OpenMP directive 'cancel'.
-OPENMP_CANCEL_CLAUSE(if)
-
 // Static attributes for 'schedule' clause.
 OPENMP_SCHEDULE_KIND(static)
 OPENMP_SCHEDULE_KIND(dynamic)
@@ -345,209 +107,11 @@ OPENMP_LINEAR_KIND(val)
 OPENMP_LINEAR_KIND(ref)
 OPENMP_LINEAR_KIND(uval)
 
-// Clauses allowed for OpenMP directive 'parallel for'.
-OPENMP_PARALLEL_FOR_CLAUSE(if)
-OPENMP_PARALLEL_FOR_CLAUSE(num_threads)
-OPENMP_PARALLEL_FOR_CLAUSE(default)
-OPENMP_PARALLEL_FOR_CLAUSE(proc_bind)
-OPENMP_PARALLEL_FOR_CLAUSE(private)
-OPENMP_PARALLEL_FOR_CLAUSE(firstprivate)
-OPENMP_PARALLEL_FOR_CLAUSE(shared)
-OPENMP_PARALLEL_FOR_CLAUSE(reduction)
-OPENMP_PARALLEL_FOR_CLAUSE(copyin)
-OPENMP_PARALLEL_FOR_CLAUSE(lastprivate)
-OPENMP_PARALLEL_FOR_CLAUSE(collapse)
-OPENMP_PARALLEL_FOR_CLAUSE(schedule)
-OPENMP_PARALLEL_FOR_CLAUSE(ordered)
-OPENMP_PARALLEL_FOR_CLAUSE(linear)
-OPENMP_PARALLEL_FOR_CLAUSE(allocate)
-OPENMP_PARALLEL_FOR_CLAUSE(order)
-
-// Clauses allowed for OpenMP directive 'parallel for simd'.
-OPENMP_PARALLEL_FOR_SIMD_CLAUSE(if)
-OPENMP_PARALLEL_FOR_SIMD_CLAUSE(num_threads)
-OPENMP_PARALLEL_FOR_SIMD_CLAUSE(default)
-OPENMP_PARALLEL_FOR_SIMD_CLAUSE(proc_bind)
-OPENMP_PARALLEL_FOR_SIMD_CLAUSE(private)
-OPENMP_PARALLEL_FOR_SIMD_CLAUSE(firstprivate)
-OPENMP_PARALLEL_FOR_SIMD_CLAUSE(shared)
-OPENMP_PARALLEL_FOR_SIMD_CLAUSE(reduction)
-OPENMP_PARALLEL_FOR_SIMD_CLAUSE(copyin)
-OPENMP_PARALLEL_FOR_SIMD_CLAUSE(lastprivate)
-OPENMP_PARALLEL_FOR_SIMD_CLAUSE(collapse)
-OPENMP_PARALLEL_FOR_SIMD_CLAUSE(schedule)
-OPENMP_PARALLEL_FOR_SIMD_CLAUSE(safelen)
-OPENMP_PARALLEL_FOR_SIMD_CLAUSE(simdlen)
-OPENMP_PARALLEL_FOR_SIMD_CLAUSE(linear)
-OPENMP_PARALLEL_FOR_SIMD_CLAUSE(aligned)
-OPENMP_PARALLEL_FOR_SIMD_CLAUSE(ordered)
-OPENMP_PARALLEL_FOR_SIMD_CLAUSE(allocate)
-OPENMP_PARALLEL_FOR_SIMD_CLAUSE(nontemporal)
-OPENMP_PARALLEL_FOR_SIMD_CLAUSE(order)
-
-// Clauses allowed for OpenMP directive 'parallel master'.
-OPENMP_PARALLEL_MASTER_CLAUSE(if)
-OPENMP_PARALLEL_MASTER_CLAUSE(num_threads)
-OPENMP_PARALLEL_MASTER_CLAUSE(default)
-OPENMP_PARALLEL_MASTER_CLAUSE(private)
-OPENMP_PARALLEL_MASTER_CLAUSE(firstprivate)
-OPENMP_PARALLEL_MASTER_CLAUSE(shared)
-OPENMP_PARALLEL_MASTER_CLAUSE(copyin)
-OPENMP_PARALLEL_MASTER_CLAUSE(reduction)
-OPENMP_PARALLEL_MASTER_CLAUSE(proc_bind)
-OPENMP_PARALLEL_MASTER_CLAUSE(allocate)
-
-// Clauses allowed for OpenMP directive 'parallel sections'.
-OPENMP_PARALLEL_SECTIONS_CLAUSE(if)
-OPENMP_PARALLEL_SECTIONS_CLAUSE(num_threads)
-OPENMP_PARALLEL_SECTIONS_CLAUSE(default)
-OPENMP_PARALLEL_SECTIONS_CLAUSE(proc_bind)
-OPENMP_PARALLEL_SECTIONS_CLAUSE(private)
-OPENMP_PARALLEL_SECTIONS_CLAUSE(firstprivate)
-OPENMP_PARALLEL_SECTIONS_CLAUSE(shared)
-OPENMP_PARALLEL_SECTIONS_CLAUSE(reduction)
-OPENMP_PARALLEL_SECTIONS_CLAUSE(copyin)
-OPENMP_PARALLEL_SECTIONS_CLAUSE(lastprivate)
-OPENMP_PARALLEL_SECTIONS_CLAUSE(allocate)
-
-// Clauses allowed for OpenMP directive 'task'.
-OPENMP_TASK_CLAUSE(if)
-OPENMP_TASK_CLAUSE(final)
-OPENMP_TASK_CLAUSE(default)
-OPENMP_TASK_CLAUSE(private)
-OPENMP_TASK_CLAUSE(firstprivate)
-OPENMP_TASK_CLAUSE(shared)
-OPENMP_TASK_CLAUSE(untied)
-OPENMP_TASK_CLAUSE(mergeable)
-OPENMP_TASK_CLAUSE(depend)
-OPENMP_TASK_CLAUSE(priority)
-OPENMP_TASK_CLAUSE(in_reduction)
-OPENMP_TASK_CLAUSE(allocate)
-OPENMP_TASK_CLAUSE(detach)
-
-// Clauses allowed for OpenMP directive 'atomic'.
-OPENMP_ATOMIC_CLAUSE(read)
-OPENMP_ATOMIC_CLAUSE(write)
-OPENMP_ATOMIC_CLAUSE(update)
-OPENMP_ATOMIC_CLAUSE(capture)
-OPENMP_ATOMIC_CLAUSE(seq_cst)
-OPENMP_ATOMIC_CLAUSE(acq_rel)
-OPENMP_ATOMIC_CLAUSE(acquire)
-OPENMP_ATOMIC_CLAUSE(release)
-OPENMP_ATOMIC_CLAUSE(relaxed)
-OPENMP_ATOMIC_CLAUSE(hint)
-
-// Clauses allowed for OpenMP directive 'target'.
-OPENMP_TARGET_CLAUSE(if)
-OPENMP_TARGET_CLAUSE(device)
-OPENMP_TARGET_CLAUSE(map)
-OPENMP_TARGET_CLAUSE(private)
-OPENMP_TARGET_CLAUSE(nowait)
-OPENMP_TARGET_CLAUSE(depend)
-OPENMP_TARGET_CLAUSE(defaultmap)
-OPENMP_TARGET_CLAUSE(firstprivate)
-OPENMP_TARGET_CLAUSE(is_device_ptr)
-OPENMP_TARGET_CLAUSE(reduction)
-OPENMP_TARGET_CLAUSE(allocate)
-
-// Clauses allowed for OpenMP directive 'requires'.
-OPENMP_REQUIRES_CLAUSE(unified_address)
-OPENMP_REQUIRES_CLAUSE(unified_shared_memory)
-OPENMP_REQUIRES_CLAUSE(reverse_offload)
-OPENMP_REQUIRES_CLAUSE(dynamic_allocators)
-OPENMP_REQUIRES_CLAUSE(atomic_default_mem_order)
-
-// Clauses allowed for OpenMP directive 'allocate'.
-OPENMP_ALLOCATE_CLAUSE(allocator)
-
 // Modifiers for 'atomic_default_mem_order' clause.
 OPENMP_ATOMIC_DEFAULT_MEM_ORDER_KIND(seq_cst)
 OPENMP_ATOMIC_DEFAULT_MEM_ORDER_KIND(acq_rel)
 OPENMP_ATOMIC_DEFAULT_MEM_ORDER_KIND(relaxed)
 
-// Clauses allowed for OpenMP directive 'target data'.
-OPENMP_TARGET_DATA_CLAUSE(if)
-OPENMP_TARGET_DATA_CLAUSE(device)
-OPENMP_TARGET_DATA_CLAUSE(map)
-OPENMP_TARGET_DATA_CLAUSE(use_device_ptr)
-
-// Clauses allowed for OpenMP directive 'target enter data'.
-OPENMP_TARGET_ENTER_DATA_CLAUSE(if)
-OPENMP_TARGET_ENTER_DATA_CLAUSE(device)
-OPENMP_TARGET_ENTER_DATA_CLAUSE(map)
-OPENMP_TARGET_ENTER_DATA_CLAUSE(nowait)
-OPENMP_TARGET_ENTER_DATA_CLAUSE(depend)
-
-// Clauses allowed for OpenMP directive 'target exit data'.
-OPENMP_TARGET_EXIT_DATA_CLAUSE(if)
-OPENMP_TARGET_EXIT_DATA_CLAUSE(device)
-OPENMP_TARGET_EXIT_DATA_CLAUSE(map)
-OPENMP_TARGET_EXIT_DATA_CLAUSE(nowait)
-OPENMP_TARGET_EXIT_DATA_CLAUSE(depend)
-
-// Clauses allowed for OpenMP directive 'target parallel'.
-OPENMP_TARGET_PARALLEL_CLAUSE(if)
-OPENMP_TARGET_PARALLEL_CLAUSE(device)
-OPENMP_TARGET_PARALLEL_CLAUSE(map)
-OPENMP_TARGET_PARALLEL_CLAUSE(private)
-OPENMP_TARGET_PARALLEL_CLAUSE(firstprivate)
-OPENMP_TARGET_PARALLEL_CLAUSE(nowait)
-OPENMP_TARGET_PARALLEL_CLAUSE(depend)
-OPENMP_TARGET_PARALLEL_CLAUSE(defaultmap)
-OPENMP_TARGET_PARALLEL_CLAUSE(num_threads)
-OPENMP_TARGET_PARALLEL_CLAUSE(default)
-OPENMP_TARGET_PARALLEL_CLAUSE(proc_bind)
-OPENMP_TARGET_PARALLEL_CLAUSE(shared)
-OPENMP_TARGET_PARALLEL_CLAUSE(reduction)
-OPENMP_TARGET_PARALLEL_CLAUSE(is_device_ptr)
-OPENMP_TARGET_PARALLEL_CLAUSE(allocate)
-
-// Clauses allowed for OpenMP directive 'target parallel for'.
-OPENMP_TARGET_PARALLEL_FOR_CLAUSE(if)
-OPENMP_TARGET_PARALLEL_FOR_CLAUSE(device)
-OPENMP_TARGET_PARALLEL_FOR_CLAUSE(map)
-OPENMP_TARGET_PARALLEL_FOR_CLAUSE(private)
-OPENMP_TARGET_PARALLEL_FOR_CLAUSE(firstprivate)
-OPENMP_TARGET_PARALLEL_FOR_CLAUSE(lastprivate)
-OPENMP_TARGET_PARALLEL_FOR_CLAUSE(nowait)
-OPENMP_TARGET_PARALLEL_FOR_CLAUSE(depend)
-OPENMP_TARGET_PARALLEL_FOR_CLAUSE(defaultmap)
-OPENMP_TARGET_PARALLEL_FOR_CLAUSE(num_threads)
-OPENMP_TARGET_PARALLEL_FOR_CLAUSE(default)
-OPENMP_TARGET_PARALLEL_FOR_CLAUSE(proc_bind)
-OPENMP_TARGET_PARALLEL_FOR_CLAUSE(shared)
-OPENMP_TARGET_PARALLEL_FOR_CLAUSE(reduction)
-OPENMP_TARGET_PARALLEL_FOR_CLAUSE(collapse)
-OPENMP_TARGET_PARALLEL_FOR_CLAUSE(schedule)
-OPENMP_TARGET_PARALLEL_FOR_CLAUSE(ordered)
-OPENMP_TARGET_PARALLEL_FOR_CLAUSE(linear)
-OPENMP_TARGET_PARALLEL_FOR_CLAUSE(is_device_ptr)
-OPENMP_TARGET_PARALLEL_FOR_CLAUSE(allocate)
-OPENMP_TARGET_PARALLEL_FOR_CLAUSE(order)
-
-// Clauses allowed for OpenMP directive 'target update'.
-OPENMP_TARGET_UPDATE_CLAUSE(if)
-OPENMP_TARGET_UPDATE_CLAUSE(device)
-OPENMP_TARGET_UPDATE_CLAUSE(to)
-OPENMP_TARGET_UPDATE_CLAUSE(from)
-OPENMP_TARGET_UPDATE_CLAUSE(nowait)
-OPENMP_TARGET_UPDATE_CLAUSE(depend)
-
-// Clauses allowed for OpenMP directive 'teams'.
-OPENMP_TEAMS_CLAUSE(default)
-OPENMP_TEAMS_CLAUSE(private)
-OPENMP_TEAMS_CLAUSE(firstprivate)
-OPENMP_TEAMS_CLAUSE(shared)
-OPENMP_TEAMS_CLAUSE(reduction)
-OPENMP_TEAMS_CLAUSE(num_teams)
-OPENMP_TEAMS_CLAUSE(thread_limit)
-OPENMP_TEAMS_CLAUSE(allocate)
-
-// Clauses allowed for OpenMP directive 'ordered'.
-OPENMP_ORDERED_CLAUSE(threads)
-OPENMP_ORDERED_CLAUSE(simd)
-OPENMP_ORDERED_CLAUSE(depend)
-
 // Map types for 'map' clause.
 OPENMP_MAP_KIND(alloc)
 OPENMP_MAP_KIND(to)
@@ -567,552 +131,39 @@ OPENMP_TO_MODIFIER_KIND(mapper)
 // Modifiers for 'from' clause.
 OPENMP_FROM_MODIFIER_KIND(mapper)
 
-// Clauses allowed for OpenMP directive 'taskloop'.
-OPENMP_TASKLOOP_CLAUSE(if)
-OPENMP_TASKLOOP_CLAUSE(shared)
-OPENMP_TASKLOOP_CLAUSE(private)
-OPENMP_TASKLOOP_CLAUSE(firstprivate)
-OPENMP_TASKLOOP_CLAUSE(lastprivate)
-OPENMP_TASKLOOP_CLAUSE(default)
-OPENMP_TASKLOOP_CLAUSE(collapse)
-OPENMP_TASKLOOP_CLAUSE(final)
-OPENMP_TASKLOOP_CLAUSE(untied)
-OPENMP_TASKLOOP_CLAUSE(mergeable)
-OPENMP_TASKLOOP_CLAUSE(priority)
-OPENMP_TASKLOOP_CLAUSE(grainsize)
-OPENMP_TASKLOOP_CLAUSE(nogroup)
-OPENMP_TASKLOOP_CLAUSE(num_tasks)
-OPENMP_TASKLOOP_CLAUSE(reduction)
-OPENMP_TASKLOOP_CLAUSE(in_reduction)
-OPENMP_TASKLOOP_CLAUSE(allocate)
-
-// Clauses allowed for OpenMP directive 'taskloop simd'.
-OPENMP_TASKLOOP_SIMD_CLAUSE(if)
-OPENMP_TASKLOOP_SIMD_CLAUSE(shared)
-OPENMP_TASKLOOP_SIMD_CLAUSE(private)
-OPENMP_TASKLOOP_SIMD_CLAUSE(firstprivate)
-OPENMP_TASKLOOP_SIMD_CLAUSE(lastprivate)
-OPENMP_TASKLOOP_SIMD_CLAUSE(default)
-OPENMP_TASKLOOP_SIMD_CLAUSE(collapse)
-OPENMP_TASKLOOP_SIMD_CLAUSE(final)
-OPENMP_TASKLOOP_SIMD_CLAUSE(untied)
-OPENMP_TASKLOOP_SIMD_CLAUSE(mergeable)
-OPENMP_TASKLOOP_SIMD_CLAUSE(priority)
-OPENMP_TASKLOOP_SIMD_CLAUSE(linear)
-OPENMP_TASKLOOP_SIMD_CLAUSE(aligned)
-OPENMP_TASKLOOP_SIMD_CLAUSE(safelen)
-OPENMP_TASKLOOP_SIMD_CLAUSE(simdlen)
-OPENMP_TASKLOOP_SIMD_CLAUSE(grainsize)
-OPENMP_TASKLOOP_SIMD_CLAUSE(nogroup)
-OPENMP_TASKLOOP_SIMD_CLAUSE(num_tasks)
-OPENMP_TASKLOOP_SIMD_CLAUSE(reduction)
-OPENMP_TASKLOOP_SIMD_CLAUSE(in_reduction)
-OPENMP_TASKLOOP_SIMD_CLAUSE(allocate)
-OPENMP_TASKLOOP_SIMD_CLAUSE(nontemporal)
-OPENMP_TASKLOOP_SIMD_CLAUSE(order)
-
-// Clauses allowed for OpenMP directive 'master taskloop'.
-OPENMP_MASTER_TASKLOOP_CLAUSE(if)
-OPENMP_MASTER_TASKLOOP_CLAUSE(shared)
-OPENMP_MASTER_TASKLOOP_CLAUSE(private)
-OPENMP_MASTER_TASKLOOP_CLAUSE(firstprivate)
-OPENMP_MASTER_TASKLOOP_CLAUSE(lastprivate)
-OPENMP_MASTER_TASKLOOP_CLAUSE(default)
-OPENMP_MASTER_TASKLOOP_CLAUSE(collapse)
-OPENMP_MASTER_TASKLOOP_CLAUSE(final)
-OPENMP_MASTER_TASKLOOP_CLAUSE(untied)
-OPENMP_MASTER_TASKLOOP_CLAUSE(mergeable)
-OPENMP_MASTER_TASKLOOP_CLAUSE(priority)
-OPENMP_MASTER_TASKLOOP_CLAUSE(grainsize)
-OPENMP_MASTER_TASKLOOP_CLAUSE(nogroup)
-OPENMP_MASTER_TASKLOOP_CLAUSE(num_tasks)
-OPENMP_MASTER_TASKLOOP_CLAUSE(reduction)
-OPENMP_MASTER_TASKLOOP_CLAUSE(in_reduction)
-OPENMP_MASTER_TASKLOOP_CLAUSE(allocate)
-
-// Clauses allowed for OpenMP directive 'master taskloop simd'.
-OPENMP_MASTER_TASKLOOP_SIMD_CLAUSE(if)
-OPENMP_MASTER_TASKLOOP_SIMD_CLAUSE(shared)
-OPENMP_MASTER_TASKLOOP_SIMD_CLAUSE(private)
-OPENMP_MASTER_TASKLOOP_SIMD_CLAUSE(firstprivate)
-OPENMP_MASTER_TASKLOOP_SIMD_CLAUSE(lastprivate)
-OPENMP_MASTER_TASKLOOP_SIMD_CLAUSE(default)
-OPENMP_MASTER_TASKLOOP_SIMD_CLAUSE(collapse)
-OPENMP_MASTER_TASKLOOP_SIMD_CLAUSE(final)
-OPENMP_MASTER_TASKLOOP_SIMD_CLAUSE(untied)
-OPENMP_MASTER_TASKLOOP_SIMD_CLAUSE(mergeable)
-OPENMP_MASTER_TASKLOOP_SIMD_CLAUSE(priority)
-OPENMP_MASTER_TASKLOOP_SIMD_CLAUSE(linear)
-OPENMP_MASTER_TASKLOOP_SIMD_CLAUSE(aligned)
-OPENMP_MASTER_TASKLOOP_SIMD_CLAUSE(safelen)
-OPENMP_MASTER_TASKLOOP_SIMD_CLAUSE(simdlen)
-OPENMP_MASTER_TASKLOOP_SIMD_CLAUSE(grainsize)
-OPENMP_MASTER_TASKLOOP_SIMD_CLAUSE(nogroup)
-OPENMP_MASTER_TASKLOOP_SIMD_CLAUSE(num_tasks)
-OPENMP_MASTER_TASKLOOP_SIMD_CLAUSE(reduction)
-OPENMP_MASTER_TASKLOOP_SIMD_CLAUSE(in_reduction)
-OPENMP_MASTER_TASKLOOP_SIMD_CLAUSE(allocate)
-OPENMP_MASTER_TASKLOOP_SIMD_CLAUSE(nontemporal)
-OPENMP_MASTER_TASKLOOP_SIMD_CLAUSE(order)
-
-// Clauses allowed for OpenMP directive 'parallel master taskloop'.
-OPENMP_PARALLEL_MASTER_TASKLOOP_CLAUSE(if)
-OPENMP_PARALLEL_MASTER_TASKLOOP_CLAUSE(shared)
-OPENMP_PARALLEL_MASTER_TASKLOOP_CLAUSE(private)
-OPENMP_PARALLEL_MASTER_TASKLOOP_CLAUSE(firstprivate)
-OPENMP_PARALLEL_MASTER_TASKLOOP_CLAUSE(lastprivate)
-OPENMP_PARALLEL_MASTER_TASKLOOP_CLAUSE(default)
-OPENMP_PARALLEL_MASTER_TASKLOOP_CLAUSE(collapse)
-OPENMP_PARALLEL_MASTER_TASKLOOP_CLAUSE(final)
-OPENMP_PARALLEL_MASTER_TASKLOOP_CLAUSE(untied)
-OPENMP_PARALLEL_MASTER_TASKLOOP_CLAUSE(mergeable)
-OPENMP_PARALLEL_MASTER_TASKLOOP_CLAUSE(priority)
-OPENMP_PARALLEL_MASTER_TASKLOOP_CLAUSE(grainsize)
-OPENMP_PARALLEL_MASTER_TASKLOOP_CLAUSE(nogroup)
-OPENMP_PARALLEL_MASTER_TASKLOOP_CLAUSE(num_tasks)
-OPENMP_PARALLEL_MASTER_TASKLOOP_CLAUSE(reduction)
-OPENMP_PARALLEL_MASTER_TASKLOOP_CLAUSE(allocate)
-OPENMP_PARALLEL_MASTER_TASKLOOP_CLAUSE(num_threads)
-OPENMP_PARALLEL_MASTER_TASKLOOP_CLAUSE(proc_bind)
-OPENMP_PARALLEL_MASTER_TASKLOOP_CLAUSE(copyin)
-
-// Clauses allowed for OpenMP directive 'parallel master taskloop simd'.
-OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE(if)
-OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE(shared)
-OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE(private)
-OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE(firstprivate)
-OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE(lastprivate)
-OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE(default)
-OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE(collapse)
-OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE(final)
-OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE(untied)
-OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE(mergeable)
-OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE(priority)
-OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE(grainsize)
-OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE(nogroup)
-OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE(num_tasks)
-OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE(reduction)
-OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE(allocate)
-OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE(num_threads)
-OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE(proc_bind)
-OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE(copyin)
-OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE(linear)
-OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE(aligned)
-OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE(safelen)
-OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE(simdlen)
-OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE(nontemporal)
-OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE(order)
-
-// Clauses allowed for OpenMP directive 'critical'.
-OPENMP_CRITICAL_CLAUSE(hint)
-
-// Clauses allowed for OpenMP directive 'distribute'
-OPENMP_DISTRIBUTE_CLAUSE(private)
-OPENMP_DISTRIBUTE_CLAUSE(firstprivate)
-OPENMP_DISTRIBUTE_CLAUSE(lastprivate)
-OPENMP_DISTRIBUTE_CLAUSE(collapse)
-OPENMP_DISTRIBUTE_CLAUSE(dist_schedule)
-OPENMP_DISTRIBUTE_CLAUSE(allocate)
-
 // Static attributes for 'dist_schedule' clause.
 OPENMP_DIST_SCHEDULE_KIND(static)
 
-// Clauses allowed for OpenMP directive 'distribute parallel for'
-OPENMP_DISTRIBUTE_PARALLEL_FOR_CLAUSE(firstprivate)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_CLAUSE(lastprivate)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_CLAUSE(collapse)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_CLAUSE(dist_schedule)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_CLAUSE(if)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_CLAUSE(num_threads)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_CLAUSE(default)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_CLAUSE(proc_bind)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_CLAUSE(private)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_CLAUSE(shared)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_CLAUSE(reduction)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_CLAUSE(copyin)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_CLAUSE(schedule)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_CLAUSE(allocate)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_CLAUSE(order)
-
-// Clauses allowed for OpenMP directive 'distribute parallel for simd'
-OPENMP_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(firstprivate)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(lastprivate)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(collapse)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(dist_schedule)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(if)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(num_threads)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(default)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(proc_bind)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(private)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(shared)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(reduction)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(copyin)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(schedule)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(linear)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(aligned)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(safelen)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(simdlen)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(allocate)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(nontemporal)
-OPENMP_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(order)
-
-// Clauses allowed for OpenMP directive 'distribute simd'
-OPENMP_DISTRIBUTE_SIMD_CLAUSE(private)
-OPENMP_DISTRIBUTE_SIMD_CLAUSE(firstprivate)
-OPENMP_DISTRIBUTE_SIMD_CLAUSE(lastprivate)
-OPENMP_DISTRIBUTE_SIMD_CLAUSE(collapse)
-OPENMP_DISTRIBUTE_SIMD_CLAUSE(dist_schedule)
-OPENMP_DISTRIBUTE_SIMD_CLAUSE(linear)
-OPENMP_DISTRIBUTE_SIMD_CLAUSE(aligned)
-OPENMP_DISTRIBUTE_SIMD_CLAUSE(safelen)
-OPENMP_DISTRIBUTE_SIMD_CLAUSE(simdlen)
-OPENMP_DISTRIBUTE_SIMD_CLAUSE(reduction)
-OPENMP_DISTRIBUTE_SIMD_CLAUSE(allocate)
-OPENMP_DISTRIBUTE_SIMD_CLAUSE(if)
-OPENMP_DISTRIBUTE_SIMD_CLAUSE(nontemporal)
-OPENMP_DISTRIBUTE_SIMD_CLAUSE(order)
-
-// Clauses allowed for OpenMP directive 'target parallel for simd'.
-OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE(if)
-OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE(device)
-OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE(map)
-OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE(private)
-OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE(firstprivate)
-OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE(lastprivate)
-OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE(nowait)
-OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE(depend)
-OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE(defaultmap)
-OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE(num_threads)
-OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE(default)
-OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE(proc_bind)
-OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE(shared)
-OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE(reduction)
-OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE(collapse)
-OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE(schedule)
-OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE(ordered)
-OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE(linear)
-OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE(safelen)
-OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE(simdlen)
-OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE(aligned)
-OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE(is_device_ptr)
-OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE(allocate)
-OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE(nontemporal)
-OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE(order)
-
-// Clauses allowed for OpenMP directive 'target simd'.
-OPENMP_TARGET_SIMD_CLAUSE(if)
-OPENMP_TARGET_SIMD_CLAUSE(device)
-OPENMP_TARGET_SIMD_CLAUSE(map)
-OPENMP_TARGET_SIMD_CLAUSE(private)
-OPENMP_TARGET_SIMD_CLAUSE(nowait)
-OPENMP_TARGET_SIMD_CLAUSE(depend)
-OPENMP_TARGET_SIMD_CLAUSE(defaultmap)
-OPENMP_TARGET_SIMD_CLAUSE(firstprivate)
-OPENMP_TARGET_SIMD_CLAUSE(is_device_ptr)
-OPENMP_TARGET_SIMD_CLAUSE(lastprivate)
-OPENMP_TARGET_SIMD_CLAUSE(linear)
-OPENMP_TARGET_SIMD_CLAUSE(aligned)
-OPENMP_TARGET_SIMD_CLAUSE(safelen)
-OPENMP_TARGET_SIMD_CLAUSE(simdlen)
-OPENMP_TARGET_SIMD_CLAUSE(collapse)
-OPENMP_TARGET_SIMD_CLAUSE(reduction)
-OPENMP_TARGET_SIMD_CLAUSE(allocate)
-OPENMP_TARGET_SIMD_CLAUSE(nontemporal)
-OPENMP_TARGET_SIMD_CLAUSE(order)
-
-// Clauses allowed for OpenMP directive 'teams distribute'.
-OPENMP_TEAMS_DISTRIBUTE_CLAUSE(default)
-OPENMP_TEAMS_DISTRIBUTE_CLAUSE(private)
-OPENMP_TEAMS_DISTRIBUTE_CLAUSE(firstprivate)
-OPENMP_TEAMS_DISTRIBUTE_CLAUSE(shared)
-OPENMP_TEAMS_DISTRIBUTE_CLAUSE(reduction)
-OPENMP_TEAMS_DISTRIBUTE_CLAUSE(num_teams)
-OPENMP_TEAMS_DISTRIBUTE_CLAUSE(thread_limit)
-OPENMP_TEAMS_DISTRIBUTE_CLAUSE(lastprivate)
-OPENMP_TEAMS_DISTRIBUTE_CLAUSE(collapse)
-OPENMP_TEAMS_DISTRIBUTE_CLAUSE(dist_schedule)
-OPENMP_TEAMS_DISTRIBUTE_CLAUSE(allocate)
-
-// Clauses allowed for OpenMP directive 'teams distribute simd'
-OPENMP_TEAMS_DISTRIBUTE_SIMD_CLAUSE(default)
-OPENMP_TEAMS_DISTRIBUTE_SIMD_CLAUSE(private)
-OPENMP_TEAMS_DISTRIBUTE_SIMD_CLAUSE(firstprivate)
-OPENMP_TEAMS_DISTRIBUTE_SIMD_CLAUSE(shared)
-OPENMP_TEAMS_DISTRIBUTE_SIMD_CLAUSE(reduction)
-OPENMP_TEAMS_DISTRIBUTE_SIMD_CLAUSE(num_teams)
-OPENMP_TEAMS_DISTRIBUTE_SIMD_CLAUSE(thread_limit)
-OPENMP_TEAMS_DISTRIBUTE_SIMD_CLAUSE(lastprivate)
-OPENMP_TEAMS_DISTRIBUTE_SIMD_CLAUSE(collapse)
-OPENMP_TEAMS_DISTRIBUTE_SIMD_CLAUSE(dist_schedule)
-OPENMP_TEAMS_DISTRIBUTE_SIMD_CLAUSE(linear)
-OPENMP_TEAMS_DISTRIBUTE_SIMD_CLAUSE(aligned)
-OPENMP_TEAMS_DISTRIBUTE_SIMD_CLAUSE(safelen)
-OPENMP_TEAMS_DISTRIBUTE_SIMD_CLAUSE(simdlen)
-OPENMP_TEAMS_DISTRIBUTE_SIMD_CLAUSE(allocate)
-OPENMP_TEAMS_DISTRIBUTE_SIMD_CLAUSE(if)
-OPENMP_TEAMS_DISTRIBUTE_SIMD_CLAUSE(nontemporal)
-OPENMP_TEAMS_DISTRIBUTE_SIMD_CLAUSE(order)
-
-// Clauses allowed for OpenMP directive 'teams distribute parallel for simd'
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(firstprivate)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(lastprivate)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(collapse)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(dist_schedule)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(if)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(num_threads)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(default)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(proc_bind)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(private)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(shared)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(reduction)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(schedule)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(linear)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(aligned)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(safelen)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(simdlen)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(num_teams)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(thread_limit)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(allocate)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(nontemporal)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(order)
-
-// Clauses allowed for OpenMP directive 'teams distribute parallel for'
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(firstprivate)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(lastprivate)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(collapse)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(dist_schedule)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(if)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(num_threads)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(default)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(proc_bind)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(private)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(shared)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(reduction)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(schedule)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(num_teams)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(thread_limit)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(copyin)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(allocate)
-OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(order)
-
-// Clauses allowed for OpenMP directive 'target teams'.
-OPENMP_TARGET_TEAMS_CLAUSE(if)
-OPENMP_TARGET_TEAMS_CLAUSE(device)
-OPENMP_TARGET_TEAMS_CLAUSE(map)
-OPENMP_TARGET_TEAMS_CLAUSE(private)
-OPENMP_TARGET_TEAMS_CLAUSE(nowait)
-OPENMP_TARGET_TEAMS_CLAUSE(depend)
-OPENMP_TARGET_TEAMS_CLAUSE(defaultmap)
-OPENMP_TARGET_TEAMS_CLAUSE(firstprivate)
-OPENMP_TARGET_TEAMS_CLAUSE(is_device_ptr)
-OPENMP_TARGET_TEAMS_CLAUSE(default)
-OPENMP_TARGET_TEAMS_CLAUSE(shared)
-OPENMP_TARGET_TEAMS_CLAUSE(reduction)
-OPENMP_TARGET_TEAMS_CLAUSE(num_teams)
-OPENMP_TARGET_TEAMS_CLAUSE(thread_limit)
-OPENMP_TARGET_TEAMS_CLAUSE(allocate)
-
-// Clauses allowed for OpenMP directive 'target teams distribute'.
-OPENMP_TARGET_TEAMS_DISTRIBUTE_CLAUSE(if)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_CLAUSE(device)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_CLAUSE(map)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_CLAUSE(private)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_CLAUSE(nowait)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_CLAUSE(depend)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_CLAUSE(defaultmap)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_CLAUSE(firstprivate)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_CLAUSE(is_device_ptr)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_CLAUSE(default)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_CLAUSE(shared)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_CLAUSE(reduction)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_CLAUSE(num_teams)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_CLAUSE(thread_limit)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_CLAUSE(lastprivate)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_CLAUSE(collapse)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_CLAUSE(dist_schedule)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_CLAUSE(allocate)
-
-// Clauses allowed for OpenMP directive 'target teams distribute parallel for'.
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(if)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(device)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(map)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(private)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(nowait)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(depend)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(defaultmap)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(firstprivate)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(is_device_ptr)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(default)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(shared)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(reduction)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(num_teams)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(thread_limit)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(lastprivate)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(collapse)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(dist_schedule)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(num_threads)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(proc_bind)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(schedule)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(allocate)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(order)
-
-// Clauses allowed for OpenMP directive
-// 'target teams distribute parallel for simd'.
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(if)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(device)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(map)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(private)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(nowait)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(depend)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(defaultmap)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(firstprivate)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(is_device_ptr)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(default)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(shared)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(reduction)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(num_teams)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(thread_limit)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(lastprivate)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(collapse)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(dist_schedule)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(num_threads)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(proc_bind)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(schedule)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(linear)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(aligned)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(safelen)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(simdlen)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(allocate)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(nontemporal)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(order)
-
-// Clauses allowed for OpenMP directive 'target teams distribute simd'.
-OPENMP_TARGET_TEAMS_DISTRIBUTE_SIMD_CLAUSE(if)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_SIMD_CLAUSE(device)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_SIMD_CLAUSE(map)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_SIMD_CLAUSE(private)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_SIMD_CLAUSE(nowait)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_SIMD_CLAUSE(depend)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_SIMD_CLAUSE(defaultmap)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_SIMD_CLAUSE(firstprivate)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_SIMD_CLAUSE(lastprivate)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_SIMD_CLAUSE(is_device_ptr)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_SIMD_CLAUSE(shared)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_SIMD_CLAUSE(reduction)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_SIMD_CLAUSE(num_teams)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_SIMD_CLAUSE(thread_limit)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_SIMD_CLAUSE(collapse)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_SIMD_CLAUSE(dist_schedule)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_SIMD_CLAUSE(linear)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_SIMD_CLAUSE(aligned)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_SIMD_CLAUSE(safelen)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_SIMD_CLAUSE(simdlen)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_SIMD_CLAUSE(allocate)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_SIMD_CLAUSE(nontemporal)
-OPENMP_TARGET_TEAMS_DISTRIBUTE_SIMD_CLAUSE(order)
-
-// Clauses allowed for OpenMP directive 'taskgroup'.
-OPENMP_TASKGROUP_CLAUSE(task_reduction)
-OPENMP_TASKGROUP_CLAUSE(allocate)
-
-// Clauses allowed for OpenMP directive 'declare mapper'.
-OPENMP_DECLARE_MAPPER_CLAUSE(map)
-
 // Device types for 'device_type' clause.
 OPENMP_DEVICE_TYPE_KIND(host)
 OPENMP_DEVICE_TYPE_KIND(nohost)
 OPENMP_DEVICE_TYPE_KIND(any)
 
-// Clauses allowed for OpenMP directive 'declare variant'.
-OPENMP_DECLARE_VARIANT_CLAUSE(match)
-
 // Type of the 'lastprivate' clause.
 OPENMP_LASTPRIVATE_KIND(conditional)
 
 // Type of the 'order' clause.
 OPENMP_ORDER_KIND(concurrent)
 
-// Clauses allowed for OpenMP directive 'flush'.
-OPENMP_FLUSH_CLAUSE(acq_rel)
-OPENMP_FLUSH_CLAUSE(acquire)
-OPENMP_FLUSH_CLAUSE(release)
-
-// Clauses allowed for OpenMP directive 'depobj'.
-OPENMP_DEPOBJ_CLAUSE(depend)
-OPENMP_DEPOBJ_CLAUSE(destroy)
-OPENMP_DEPOBJ_CLAUSE(update)
-
 // Modifiers for 'reduction' clause.
 OPENMP_REDUCTION_MODIFIER(default)
 OPENMP_REDUCTION_MODIFIER(inscan)
 
 #undef OPENMP_REDUCTION_MODIFIER
-#undef OPENMP_SCAN_CLAUSE
 #undef OPENMP_DEVICE_MODIFIER
-#undef OPENMP_DEPOBJ_CLAUSE
-#undef OPENMP_FLUSH_CLAUSE
 #undef OPENMP_ORDER_KIND
 #undef OPENMP_LASTPRIVATE_KIND
-#undef OPENMP_DECLARE_VARIANT_CLAUSE
 #undef OPENMP_DEVICE_TYPE_KIND
-#undef OPENMP_ALLOCATE_CLAUSE
-#undef OPENMP_DECLARE_MAPPER_CLAUSE
-#undef OPENMP_TASKGROUP_CLAUSE
-#undef OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE
-#undef OPENMP_PARALLEL_MASTER_TASKLOOP_CLAUSE
-#undef OPENMP_MASTER_TASKLOOP_SIMD_CLAUSE
-#undef OPENMP_MASTER_TASKLOOP_CLAUSE
-#undef OPENMP_TASKLOOP_SIMD_CLAUSE
-#undef OPENMP_TASKLOOP_CLAUSE
 #undef OPENMP_LINEAR_KIND
 #undef OPENMP_DEPEND_KIND
 #undef OPENMP_SCHEDULE_MODIFIER
 #undef OPENMP_SCHEDULE_KIND
-#undef OPENMP_CLAUSE
-#undef OPENMP_CRITICAL_CLAUSE
-#undef OPENMP_ORDERED_CLAUSE
-#undef OPENMP_CANCEL_CLAUSE
-#undef OPENMP_SINGLE_CLAUSE
-#undef OPENMP_SECTIONS_CLAUSE
-#undef OPENMP_PARALLEL_CLAUSE
-#undef OPENMP_PARALLEL_FOR_CLAUSE
-#undef OPENMP_PARALLEL_FOR_SIMD_CLAUSE
-#undef OPENMP_PARALLEL_MASTER_CLAUSE
-#undef OPENMP_PARALLEL_SECTIONS_CLAUSE
-#undef OPENMP_TASK_CLAUSE
-#undef OPENMP_ATOMIC_CLAUSE
-#undef OPENMP_TARGET_CLAUSE
-#undef OPENMP_REQUIRES_CLAUSE
 #undef OPENMP_ATOMIC_DEFAULT_MEM_ORDER_KIND
-#undef OPENMP_TARGET_DATA_CLAUSE
-#undef OPENMP_TARGET_ENTER_DATA_CLAUSE
-#undef OPENMP_TARGET_EXIT_DATA_CLAUSE
-#undef OPENMP_TARGET_PARALLEL_CLAUSE
-#undef OPENMP_TARGET_PARALLEL_FOR_CLAUSE
-#undef OPENMP_TEAMS_CLAUSE
-#undef OPENMP_SIMD_CLAUSE
-#undef OPENMP_FOR_CLAUSE
-#undef OPENMP_FOR_SIMD_CLAUSE
 #undef OPENMP_MAP_KIND
 #undef OPENMP_MAP_MODIFIER_KIND
 #undef OPENMP_TO_MODIFIER_KIND
 #undef OPENMP_FROM_MODIFIER_KIND
-#undef OPENMP_DISTRIBUTE_CLAUSE
 #undef OPENMP_DIST_SCHEDULE_KIND
 #undef OPENMP_DEFAULTMAP_KIND
 #undef OPENMP_DEFAULTMAP_MODIFIER
-#undef OPENMP_TARGET_UPDATE_CLAUSE
-#undef OPENMP_DISTRIBUTE_PARALLEL_FOR_CLAUSE
-#undef OPENMP_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE
-#undef OPENMP_DISTRIBUTE_SIMD_CLAUSE
-#undef OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE
-#undef OPENMP_TARGET_SIMD_CLAUSE
-#undef OPENMP_TEAMS_DISTRIBUTE_CLAUSE
-#undef OPENMP_TEAMS_DISTRIBUTE_SIMD_CLAUSE
-#undef OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE
-#undef OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE
-#undef OPENMP_TARGET_TEAMS_CLAUSE
-#undef OPENMP_TARGET_TEAMS_DISTRIBUTE_CLAUSE
-#undef OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE
-#undef OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE
-#undef OPENMP_TARGET_TEAMS_DISTRIBUTE_SIMD_CLAUSE
+

diff  --git a/clang/include/clang/Basic/OpenMPKinds.h b/clang/include/clang/Basic/OpenMPKinds.h
index 9a6a2050a165..08aaf2d43bfd 100644
--- a/clang/include/clang/Basic/OpenMPKinds.h
+++ b/clang/include/clang/Basic/OpenMPKinds.h
@@ -173,10 +173,6 @@ enum OpenMPReductionClauseModifier {
 unsigned getOpenMPSimpleClauseType(OpenMPClauseKind Kind, llvm::StringRef Str);
 const char *getOpenMPSimpleClauseTypeName(OpenMPClauseKind Kind, unsigned Type);
 
-bool isAllowedClauseForDirective(OpenMPDirectiveKind DKind,
-                                 OpenMPClauseKind CKind,
-                                 unsigned OpenMPVersion);
-
 /// Checks if the specified directive is a directive with an associated
 /// loop construct.
 /// \param DKind Specified directive.

diff  --git a/clang/lib/ASTMatchers/Dynamic/CMakeLists.txt b/clang/lib/ASTMatchers/Dynamic/CMakeLists.txt
index 82c12a47fa93..10bd9c455eb4 100644
--- a/clang/lib/ASTMatchers/Dynamic/CMakeLists.txt
+++ b/clang/lib/ASTMatchers/Dynamic/CMakeLists.txt
@@ -1,4 +1,7 @@
-set(LLVM_LINK_COMPONENTS support)
+set(LLVM_LINK_COMPONENTS
+  FrontendOpenMP
+  Support
+)
 
 # The registry source file ends up generating a lot of sections for each
 # matcher. Each matcher appears to get a vtable and several methods. Each

diff  --git a/clang/lib/Basic/OpenMPKinds.cpp b/clang/lib/Basic/OpenMPKinds.cpp
index 981bd7adbe9b..888666b30d2e 100644
--- a/clang/lib/Basic/OpenMPKinds.cpp
+++ b/clang/lib/Basic/OpenMPKinds.cpp
@@ -425,581 +425,6 @@ const char *clang::getOpenMPSimpleClauseTypeName(OpenMPClauseKind Kind,
   llvm_unreachable("Invalid OpenMP simple clause kind");
 }
 
-bool clang::isAllowedClauseForDirective(OpenMPDirectiveKind DKind,
-                                        OpenMPClauseKind CKind,
-                                        unsigned OpenMPVersion) {
-  assert(unsigned(DKind) <= unsigned(OMPD_unknown));
-  assert(CKind <= OMPC_unknown);
-  // Nontemporal clause is not supported in OpenMP < 5.0.
-  if (OpenMPVersion < 50 && CKind == OMPC_nontemporal)
-    return false;
-  // Order clause is not supported in OpenMP < 5.0.
-  if (OpenMPVersion < 50 && CKind == OMPC_order)
-    return false;
-  switch (DKind) {
-  case OMPD_parallel:
-    switch (CKind) {
-#define OPENMP_PARALLEL_CLAUSE(Name)                                           \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_simd:
-    if (OpenMPVersion < 50 && CKind == OMPC_if)
-      return false;
-    switch (CKind) {
-#define OPENMP_SIMD_CLAUSE(Name)                                               \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_for:
-    switch (CKind) {
-#define OPENMP_FOR_CLAUSE(Name)                                                \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_for_simd:
-    if (OpenMPVersion < 50 && CKind == OMPC_if)
-      return false;
-    switch (CKind) {
-#define OPENMP_FOR_SIMD_CLAUSE(Name)                                           \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_sections:
-    switch (CKind) {
-#define OPENMP_SECTIONS_CLAUSE(Name)                                           \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_single:
-    switch (CKind) {
-#define OPENMP_SINGLE_CLAUSE(Name)                                             \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_parallel_for:
-    switch (CKind) {
-#define OPENMP_PARALLEL_FOR_CLAUSE(Name)                                       \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_parallel_for_simd:
-    switch (CKind) {
-#define OPENMP_PARALLEL_FOR_SIMD_CLAUSE(Name)                                  \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_parallel_master:
-    switch (CKind) {
-#define OPENMP_PARALLEL_MASTER_CLAUSE(Name)                                    \
-    case OMPC_##Name:                                                          \
-      return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_parallel_sections:
-    switch (CKind) {
-#define OPENMP_PARALLEL_SECTIONS_CLAUSE(Name)                                  \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_task:
-    if (OpenMPVersion < 50 && CKind == OMPC_detach)
-      return false;
-    switch (CKind) {
-#define OPENMP_TASK_CLAUSE(Name)                                               \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_flush:
-    if (CKind == OMPC_flush)
-      return true;
-    if (OpenMPVersion < 50)
-      return false;
-    switch (CKind) {
-#define OPENMP_FLUSH_CLAUSE(Name)                                              \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_depobj:
-    if (OpenMPVersion < 50)
-      return false;
-    switch (CKind) {
-#define OPENMP_DEPOBJ_CLAUSE(Name)                                             \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    case OMPC_depobj:
-      return true;
-    default:
-      break;
-    }
-    break;
-  case OMPD_scan:
-    if (OpenMPVersion < 50)
-      return false;
-    switch (CKind) {
-#define OPENMP_SCAN_CLAUSE(Name)                                               \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_atomic:
-    if (OpenMPVersion < 50 &&
-        (CKind == OMPC_acq_rel || CKind == OMPC_acquire ||
-         CKind == OMPC_release || CKind == OMPC_relaxed || CKind == OMPC_hint))
-      return false;
-    switch (CKind) {
-#define OPENMP_ATOMIC_CLAUSE(Name)                                             \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_target:
-    switch (CKind) {
-#define OPENMP_TARGET_CLAUSE(Name)                                             \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_requires:
-    switch (CKind) {
-#define OPENMP_REQUIRES_CLAUSE(Name)                                             \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_target_data:
-    switch (CKind) {
-#define OPENMP_TARGET_DATA_CLAUSE(Name)                                        \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_target_enter_data:
-    switch (CKind) {
-#define OPENMP_TARGET_ENTER_DATA_CLAUSE(Name)                                  \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_target_exit_data:
-    switch (CKind) {
-#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;
-    }
-    break;
-  case OMPD_target_parallel_for:
-    switch (CKind) {
-#define OPENMP_TARGET_PARALLEL_FOR_CLAUSE(Name)                                \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_target_update:
-    switch (CKind) {
-#define OPENMP_TARGET_UPDATE_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)                                              \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_cancel:
-    switch (CKind) {
-#define OPENMP_CANCEL_CLAUSE(Name)                                             \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_ordered:
-    switch (CKind) {
-#define OPENMP_ORDERED_CLAUSE(Name)                                            \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_taskloop:
-    switch (CKind) {
-#define OPENMP_TASKLOOP_CLAUSE(Name)                                           \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_taskloop_simd:
-    switch (CKind) {
-#define OPENMP_TASKLOOP_SIMD_CLAUSE(Name)                                      \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_master_taskloop:
-    switch (CKind) {
-#define OPENMP_MASTER_TASKLOOP_CLAUSE(Name)                                    \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_master_taskloop_simd:
-    switch (CKind) {
-#define OPENMP_MASTER_TASKLOOP_SIMD_CLAUSE(Name)                               \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_parallel_master_taskloop:
-    switch (CKind) {
-#define OPENMP_PARALLEL_MASTER_TASKLOOP_CLAUSE(Name)                           \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_parallel_master_taskloop_simd:
-    switch (CKind) {
-#define OPENMP_PARALLEL_MASTER_TASKLOOP_SIMD_CLAUSE(Name)                      \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_critical:
-    switch (CKind) {
-#define OPENMP_CRITICAL_CLAUSE(Name)                                           \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      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_distribute_parallel_for:
-    switch (CKind) {
-#define OPENMP_DISTRIBUTE_PARALLEL_FOR_CLAUSE(Name)                            \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_distribute_parallel_for_simd:
-    switch (CKind) {
-#define OPENMP_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(Name)                       \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_distribute_simd:
-    if (OpenMPVersion < 50 && CKind == OMPC_if)
-      return false;
-    switch (CKind) {
-#define OPENMP_DISTRIBUTE_SIMD_CLAUSE(Name)                                    \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_target_parallel_for_simd:
-    switch (CKind) {
-#define OPENMP_TARGET_PARALLEL_FOR_SIMD_CLAUSE(Name)                           \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_target_simd:
-    switch (CKind) {
-#define OPENMP_TARGET_SIMD_CLAUSE(Name)                                        \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_teams_distribute:
-    switch (CKind) {
-#define OPENMP_TEAMS_DISTRIBUTE_CLAUSE(Name)                                   \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_teams_distribute_simd:
-    if (OpenMPVersion < 50 && CKind == OMPC_if)
-      return false;
-    switch (CKind) {
-#define OPENMP_TEAMS_DISTRIBUTE_SIMD_CLAUSE(Name)                              \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_teams_distribute_parallel_for_simd:
-    switch (CKind) {
-#define OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(Name)                 \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_teams_distribute_parallel_for:
-    switch (CKind) {
-#define OPENMP_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(Name)                      \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_target_teams:
-    switch (CKind) {
-#define OPENMP_TARGET_TEAMS_CLAUSE(Name)                                       \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_target_teams_distribute:
-    switch (CKind) {
-#define OPENMP_TARGET_TEAMS_DISTRIBUTE_CLAUSE(Name)                            \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_target_teams_distribute_parallel_for:
-    switch (CKind) {
-#define OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_CLAUSE(Name)               \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_target_teams_distribute_parallel_for_simd:
-    switch (CKind) {
-#define OPENMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_FOR_SIMD_CLAUSE(Name)          \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_target_teams_distribute_simd:
-    switch (CKind) {
-#define OPENMP_TARGET_TEAMS_DISTRIBUTE_SIMD_CLAUSE(Name)                       \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_taskgroup:
-    switch (CKind) {
-#define OPENMP_TASKGROUP_CLAUSE(Name)                                          \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_declare_mapper:
-    switch (CKind) {
-#define OPENMP_DECLARE_MAPPER_CLAUSE(Name)                                     \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_allocate:
-    switch (CKind) {
-#define OPENMP_ALLOCATE_CLAUSE(Name)                                           \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_declare_variant:
-    switch (CKind) {
-#define OPENMP_DECLARE_VARIANT_CLAUSE(Name)                                    \
-  case OMPC_##Name:                                                            \
-    return true;
-#include "clang/Basic/OpenMPKinds.def"
-    default:
-      break;
-    }
-    break;
-  case OMPD_begin_declare_variant:
-  case OMPD_end_declare_variant:
-  case OMPD_declare_target:
-  case OMPD_end_declare_target:
-  case OMPD_unknown:
-  case OMPD_threadprivate:
-  case OMPD_section:
-  case OMPD_master:
-  case OMPD_taskyield:
-  case OMPD_barrier:
-  case OMPD_taskwait:
-  case OMPD_cancellation_point:
-  case OMPD_declare_reduction:
-  case OMPD_declare_simd:
-    break;
-  }
-  return false;
-}
-
 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 ||

diff  --git a/clang/lib/Tooling/CMakeLists.txt b/clang/lib/Tooling/CMakeLists.txt
index 59c990daaa29..71b6cc55e504 100644
--- a/clang/lib/Tooling/CMakeLists.txt
+++ b/clang/lib/Tooling/CMakeLists.txt
@@ -1,5 +1,6 @@
 set(LLVM_LINK_COMPONENTS
   Option
+  FrontendOpenMP
   Support
   )
 

diff  --git a/clang/lib/Tooling/Transformer/CMakeLists.txt b/clang/lib/Tooling/Transformer/CMakeLists.txt
index 68f0cfeee8f6..281af1007a65 100644
--- a/clang/lib/Tooling/Transformer/CMakeLists.txt
+++ b/clang/lib/Tooling/Transformer/CMakeLists.txt
@@ -1,4 +1,7 @@
-set(LLVM_LINK_COMPONENTS Support)
+set(LLVM_LINK_COMPONENTS
+  FrontendOpenMP
+  Support
+)
 
 add_clang_library(clangTransformer
   RangeSelector.cpp

diff  --git a/clang/unittests/AST/CMakeLists.txt b/clang/unittests/AST/CMakeLists.txt
index b738ce08d06d..868635b6eea5 100644
--- a/clang/unittests/AST/CMakeLists.txt
+++ b/clang/unittests/AST/CMakeLists.txt
@@ -1,4 +1,5 @@
 set(LLVM_LINK_COMPONENTS
+  FrontendOpenMP
   Support
   )
 

diff  --git a/clang/unittests/ASTMatchers/CMakeLists.txt b/clang/unittests/ASTMatchers/CMakeLists.txt
index aa5438c947f4..e128cfe695a6 100644
--- a/clang/unittests/ASTMatchers/CMakeLists.txt
+++ b/clang/unittests/ASTMatchers/CMakeLists.txt
@@ -1,4 +1,5 @@
 set(LLVM_LINK_COMPONENTS
+  FrontendOpenMP
   Support
   )
 

diff  --git a/clang/unittests/ASTMatchers/Dynamic/CMakeLists.txt b/clang/unittests/ASTMatchers/Dynamic/CMakeLists.txt
index c40964dfaf0b..85556b01cae1 100644
--- a/clang/unittests/ASTMatchers/Dynamic/CMakeLists.txt
+++ b/clang/unittests/ASTMatchers/Dynamic/CMakeLists.txt
@@ -1,4 +1,5 @@
 set(LLVM_LINK_COMPONENTS
+  FrontendOpenMP
   Support
   )
 

diff  --git a/clang/unittests/Analysis/CMakeLists.txt b/clang/unittests/Analysis/CMakeLists.txt
index 03716e2e5e97..66069c854a6a 100644
--- a/clang/unittests/Analysis/CMakeLists.txt
+++ b/clang/unittests/Analysis/CMakeLists.txt
@@ -1,4 +1,5 @@
 set(LLVM_LINK_COMPONENTS
+  FrontendOpenMP
   Support
   )
 

diff  --git a/clang/unittests/Rename/CMakeLists.txt b/clang/unittests/Rename/CMakeLists.txt
index a33d7d8ef720..6ec0c521551c 100644
--- a/clang/unittests/Rename/CMakeLists.txt
+++ b/clang/unittests/Rename/CMakeLists.txt
@@ -1,4 +1,5 @@
 set(LLVM_LINK_COMPONENTS
+  FrontendOpenMP
   support
   )
 

diff  --git a/clang/unittests/Sema/CMakeLists.txt b/clang/unittests/Sema/CMakeLists.txt
index 6832908e7fb1..24105d7756f4 100644
--- a/clang/unittests/Sema/CMakeLists.txt
+++ b/clang/unittests/Sema/CMakeLists.txt
@@ -1,4 +1,5 @@
 set(LLVM_LINK_COMPONENTS
+  FrontendOpenMP
   Support
   )
 

diff  --git a/clang/unittests/StaticAnalyzer/CMakeLists.txt b/clang/unittests/StaticAnalyzer/CMakeLists.txt
index ff92bdcb299a..5ce660f00040 100644
--- a/clang/unittests/StaticAnalyzer/CMakeLists.txt
+++ b/clang/unittests/StaticAnalyzer/CMakeLists.txt
@@ -1,4 +1,5 @@
 set(LLVM_LINK_COMPONENTS
+  FrontendOpenMP
   Support
   )
 

diff  --git a/clang/unittests/Tooling/CMakeLists.txt b/clang/unittests/Tooling/CMakeLists.txt
index 1f66ffd598d4..67ab6bea2016 100644
--- a/clang/unittests/Tooling/CMakeLists.txt
+++ b/clang/unittests/Tooling/CMakeLists.txt
@@ -1,5 +1,6 @@
 set(LLVM_LINK_COMPONENTS
   ${LLVM_TARGETS_TO_BUILD}
+  FrontendOpenMP
   Support
   )
 

diff  --git a/llvm/include/llvm/Frontend/OpenMP/OMPConstants.h b/llvm/include/llvm/Frontend/OpenMP/OMPConstants.h
index d32fa8dc98ef..40da41be9297 100644
--- a/llvm/include/llvm/Frontend/OpenMP/OMPConstants.h
+++ b/llvm/include/llvm/Frontend/OpenMP/OMPConstants.h
@@ -100,6 +100,9 @@ Clause getOpenMPClauseKind(StringRef Str);
 /// Return a textual representation of the clause \p C.
 StringRef getOpenMPClauseName(Clause C);
 
+/// Return true if \p C is a valid clause for \p D in version \p Version.
+bool isAllowedClauseForDirective(Directive D, Clause C, unsigned Version);
+
 /// Forward declarations for LLVM-IR types (simple, function and structure) are
 /// generated below. Their names are defined and used in OpenMP/OMPKinds.def.
 /// Here we provide the forward declarations, the initializeTypes function will

diff  --git a/llvm/include/llvm/Frontend/OpenMP/OMPKinds.def b/llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
index 09468358415f..7ac614e99201 100644
--- a/llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
+++ b/llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
@@ -710,3 +710,732 @@ OMP_LAST_TRAIT_PROPERTY(
 #undef __OMP_REQUIRES_TRAIT
 #undef OMP_REQUIRES_TRAIT
 ///}
+
+
+/// Clauses allowed per directive
+///
+///{
+
+#ifndef OMP_DIRECTIVE_CLAUSE
+#define OMP_DIRECTIVE_CLAUSE(Directive, MinVersion, MaxVersion, Clause)
+#endif
+
+#define __OMP_DIRECTIVE_CLAUSE(Directive, MinVersion, MaxVersion, Clause)      \
+  OMP_DIRECTIVE_CLAUSE(OMPD_##Directive, unsigned(MinVersion),                 \
+                       unsigned(MaxVersion), OMPC_##Clause)
+
+__OMP_DIRECTIVE_CLAUSE(scan, 50, ~0, inclusive)
+__OMP_DIRECTIVE_CLAUSE(scan, 50, ~0, exclusive)
+
+__OMP_DIRECTIVE_CLAUSE(parallel, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(parallel, 1, ~0, num_threads)
+__OMP_DIRECTIVE_CLAUSE(parallel, 1, ~0, default)
+__OMP_DIRECTIVE_CLAUSE(parallel, 1, ~0, proc_bind)
+__OMP_DIRECTIVE_CLAUSE(parallel, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(parallel, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(parallel, 1, ~0, shared)
+__OMP_DIRECTIVE_CLAUSE(parallel, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(parallel, 1, ~0, copyin)
+__OMP_DIRECTIVE_CLAUSE(parallel, 1, ~0, allocate)
+
+__OMP_DIRECTIVE_CLAUSE(simd, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(simd, 1, ~0, lastprivate)
+__OMP_DIRECTIVE_CLAUSE(simd, 1, ~0, linear)
+__OMP_DIRECTIVE_CLAUSE(simd, 1, ~0, aligned)
+__OMP_DIRECTIVE_CLAUSE(simd, 1, ~0, safelen)
+__OMP_DIRECTIVE_CLAUSE(simd, 1, ~0, simdlen)
+__OMP_DIRECTIVE_CLAUSE(simd, 1, ~0, collapse)
+__OMP_DIRECTIVE_CLAUSE(simd, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(simd, 1, ~0, allocate)
+__OMP_DIRECTIVE_CLAUSE(simd, 50, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(simd, 50, ~0, nontemporal)
+__OMP_DIRECTIVE_CLAUSE(simd, 50, ~0, order)
+
+__OMP_DIRECTIVE_CLAUSE(for, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(for, 1, ~0, lastprivate)
+__OMP_DIRECTIVE_CLAUSE(for, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(for, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(for, 1, ~0, collapse)
+__OMP_DIRECTIVE_CLAUSE(for, 1, ~0, schedule)
+__OMP_DIRECTIVE_CLAUSE(for, 1, ~0, ordered)
+__OMP_DIRECTIVE_CLAUSE(for, 1, ~0, nowait)
+__OMP_DIRECTIVE_CLAUSE(for, 1, ~0, linear)
+__OMP_DIRECTIVE_CLAUSE(for, 1, ~0, allocate)
+__OMP_DIRECTIVE_CLAUSE(for, 50, ~0, order)
+
+__OMP_DIRECTIVE_CLAUSE(for_simd, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(for_simd, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(for_simd, 1, ~0, lastprivate)
+__OMP_DIRECTIVE_CLAUSE(for_simd, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(for_simd, 1, ~0, schedule)
+__OMP_DIRECTIVE_CLAUSE(for_simd, 1, ~0, collapse)
+__OMP_DIRECTIVE_CLAUSE(for_simd, 1, ~0, nowait)
+__OMP_DIRECTIVE_CLAUSE(for_simd, 1, ~0, safelen)
+__OMP_DIRECTIVE_CLAUSE(for_simd, 1, ~0, simdlen)
+__OMP_DIRECTIVE_CLAUSE(for_simd, 1, ~0, linear)
+__OMP_DIRECTIVE_CLAUSE(for_simd, 1, ~0, aligned)
+__OMP_DIRECTIVE_CLAUSE(for_simd, 1, ~1, ordered)
+__OMP_DIRECTIVE_CLAUSE(for_simd, 1, ~0, allocate)
+__OMP_DIRECTIVE_CLAUSE(for_simd, 50, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(for_simd, 50, ~0, nontemporal)
+__OMP_DIRECTIVE_CLAUSE(for_simd, 50, ~0, order)
+
+__OMP_DIRECTIVE_CLAUSE(sections, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(sections, 1, ~0, lastprivate)
+__OMP_DIRECTIVE_CLAUSE(sections, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(sections, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(sections, 1, ~0, nowait)
+__OMP_DIRECTIVE_CLAUSE(sections, 1, ~0, allocate)
+
+__OMP_DIRECTIVE_CLAUSE(single, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(single, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(single, 1, ~0, copyprivate)
+__OMP_DIRECTIVE_CLAUSE(single, 1, ~0, nowait)
+__OMP_DIRECTIVE_CLAUSE(single, 1, ~0, allocate)
+
+__OMP_DIRECTIVE_CLAUSE(cancel, 1, ~0, if)
+
+__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~0, num_threads)
+__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~0, default)
+__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~0, proc_bind)
+__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~0, shared)
+__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~0, copyin)
+__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~0, lastprivate)
+__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~0, collapse)
+__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~0, schedule)
+__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~1, ordered)
+__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~0, linear)
+__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~0, allocate)
+__OMP_DIRECTIVE_CLAUSE(parallel_for, 50, ~0, order)
+
+__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, num_threads)
+__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, default)
+__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, proc_bind)
+__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, shared)
+__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, copyin)
+__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, lastprivate)
+__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, collapse)
+__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, schedule)
+__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, safelen)
+__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, simdlen)
+__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, linear)
+__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, aligned)
+__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~1, ordered)
+__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, allocate)
+__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 50, ~0, nontemporal)
+__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 50, ~0, order)
+
+__OMP_DIRECTIVE_CLAUSE(parallel_master, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(parallel_master, 1, ~0, num_threads)
+__OMP_DIRECTIVE_CLAUSE(parallel_master, 1, ~0, default)
+__OMP_DIRECTIVE_CLAUSE(parallel_master, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(parallel_master, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(parallel_master, 1, ~0, shared)
+__OMP_DIRECTIVE_CLAUSE(parallel_master, 1, ~0, copyin)
+__OMP_DIRECTIVE_CLAUSE(parallel_master, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(parallel_master, 1, ~0, proc_bind)
+__OMP_DIRECTIVE_CLAUSE(parallel_master, 1, ~0, allocate)
+
+__OMP_DIRECTIVE_CLAUSE(parallel_sections, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(parallel_sections, 1, ~0, num_threads)
+__OMP_DIRECTIVE_CLAUSE(parallel_sections, 1, ~0, default)
+__OMP_DIRECTIVE_CLAUSE(parallel_sections, 1, ~0, proc_bind)
+__OMP_DIRECTIVE_CLAUSE(parallel_sections, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(parallel_sections, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(parallel_sections, 1, ~0, shared)
+__OMP_DIRECTIVE_CLAUSE(parallel_sections, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(parallel_sections, 1, ~0, copyin)
+__OMP_DIRECTIVE_CLAUSE(parallel_sections, 1, ~0, lastprivate)
+__OMP_DIRECTIVE_CLAUSE(parallel_sections, 1, ~0, allocate)
+
+__OMP_DIRECTIVE_CLAUSE(task, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(task, 1, ~0, final)
+__OMP_DIRECTIVE_CLAUSE(task, 1, ~0, default)
+__OMP_DIRECTIVE_CLAUSE(task, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(task, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(task, 1, ~0, shared)
+__OMP_DIRECTIVE_CLAUSE(task, 1, ~0, untied)
+__OMP_DIRECTIVE_CLAUSE(task, 1, ~0, mergeable)
+__OMP_DIRECTIVE_CLAUSE(task, 1, ~0, depend)
+__OMP_DIRECTIVE_CLAUSE(task, 1, ~0, priority)
+__OMP_DIRECTIVE_CLAUSE(task, 1, ~0, in_reduction)
+__OMP_DIRECTIVE_CLAUSE(task, 1, ~0, allocate)
+__OMP_DIRECTIVE_CLAUSE(task, 50, ~0, detach)
+
+__OMP_DIRECTIVE_CLAUSE(atomic, 1, ~0, read)
+__OMP_DIRECTIVE_CLAUSE(atomic, 1, ~0, write)
+__OMP_DIRECTIVE_CLAUSE(atomic, 1, ~0, update)
+__OMP_DIRECTIVE_CLAUSE(atomic, 1, ~0, capture)
+__OMP_DIRECTIVE_CLAUSE(atomic, 1, ~0, seq_cst)
+__OMP_DIRECTIVE_CLAUSE(atomic, 50, ~0, acq_rel)
+__OMP_DIRECTIVE_CLAUSE(atomic, 50, ~0, acquire)
+__OMP_DIRECTIVE_CLAUSE(atomic, 50, ~0, release)
+__OMP_DIRECTIVE_CLAUSE(atomic, 50, ~0, relaxed)
+__OMP_DIRECTIVE_CLAUSE(atomic, 50, ~0, hint)
+
+__OMP_DIRECTIVE_CLAUSE(target, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(target, 1, ~0, device)
+__OMP_DIRECTIVE_CLAUSE(target, 1, ~0, map)
+__OMP_DIRECTIVE_CLAUSE(target, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(target, 1, ~0, nowait)
+__OMP_DIRECTIVE_CLAUSE(target, 1, ~0, depend)
+__OMP_DIRECTIVE_CLAUSE(target, 1, ~0, defaultmap)
+__OMP_DIRECTIVE_CLAUSE(target, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(target, 1, ~0, is_device_ptr)
+__OMP_DIRECTIVE_CLAUSE(target, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(target, 1, ~0, allocate)
+
+__OMP_DIRECTIVE_CLAUSE(requires, 1, ~0, unified_address)
+__OMP_DIRECTIVE_CLAUSE(requires, 1, ~0, unified_shared_memory)
+__OMP_DIRECTIVE_CLAUSE(requires, 1, ~0, reverse_offload)
+__OMP_DIRECTIVE_CLAUSE(requires, 1, ~0, dynamic_allocators)
+__OMP_DIRECTIVE_CLAUSE(requires, 1, ~0, atomic_default_mem_order)
+
+__OMP_DIRECTIVE_CLAUSE(allocate, 1, ~0, allocator)
+
+__OMP_DIRECTIVE_CLAUSE(target_data, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(target_data, 1, ~0, device)
+__OMP_DIRECTIVE_CLAUSE(target_data, 1, ~0, map)
+__OMP_DIRECTIVE_CLAUSE(target_data, 1, ~0, use_device_ptr)
+
+__OMP_DIRECTIVE_CLAUSE(target_enter_data, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(target_enter_data, 1, ~0, device)
+__OMP_DIRECTIVE_CLAUSE(target_enter_data, 1, ~0, map)
+__OMP_DIRECTIVE_CLAUSE(target_enter_data, 1, ~0, nowait)
+__OMP_DIRECTIVE_CLAUSE(target_enter_data, 1, ~0, depend)
+
+__OMP_DIRECTIVE_CLAUSE(target_exit_data, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(target_exit_data, 1, ~0, device)
+__OMP_DIRECTIVE_CLAUSE(target_exit_data, 1, ~0, map)
+__OMP_DIRECTIVE_CLAUSE(target_exit_data, 1, ~0, nowait)
+__OMP_DIRECTIVE_CLAUSE(target_exit_data, 1, ~0, depend)
+
+__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, device)
+__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, map)
+__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, nowait)
+__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, depend)
+__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, defaultmap)
+__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, num_threads)
+__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, default)
+__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, proc_bind)
+__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, shared)
+__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, is_device_ptr)
+__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, allocate)
+
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, device)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, map)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, lastprivate)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, nowait)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, depend)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, defaultmap)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, num_threads)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, default)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, proc_bind)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, shared)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, collapse)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, schedule)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~1, ordered)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, linear)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, is_device_ptr)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, allocate)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 50, ~0, order)
+
+__OMP_DIRECTIVE_CLAUSE(target_update, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(target_update, 1, ~0, device)
+__OMP_DIRECTIVE_CLAUSE(target_update, 1, ~0, to)
+__OMP_DIRECTIVE_CLAUSE(target_update, 1, ~0, from)
+__OMP_DIRECTIVE_CLAUSE(target_update, 1, ~0, nowait)
+__OMP_DIRECTIVE_CLAUSE(target_update, 1, ~0, depend)
+
+__OMP_DIRECTIVE_CLAUSE(teams, 1, ~0, default)
+__OMP_DIRECTIVE_CLAUSE(teams, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(teams, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(teams, 1, ~0, shared)
+__OMP_DIRECTIVE_CLAUSE(teams, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(teams, 1, ~0, num_teams)
+__OMP_DIRECTIVE_CLAUSE(teams, 1, ~0, thread_limit)
+__OMP_DIRECTIVE_CLAUSE(teams, 1, ~0, allocate)
+
+__OMP_DIRECTIVE_CLAUSE(ordered, 1, ~0, threads)
+__OMP_DIRECTIVE_CLAUSE(ordered, 1, ~0, simd)
+__OMP_DIRECTIVE_CLAUSE(ordered, 1, ~0, depend)
+
+__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, shared)
+__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, lastprivate)
+__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, default)
+__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, collapse)
+__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, final)
+__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, untied)
+__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, mergeable)
+__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, priority)
+__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, grainsize)
+__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, nogroup)
+__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, num_tasks)
+__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, in_reduction)
+__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, allocate)
+
+__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, shared)
+__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, lastprivate)
+__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, default)
+__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, collapse)
+__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, final)
+__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, untied)
+__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, mergeable)
+__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, priority)
+__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, linear)
+__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, aligned)
+__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, safelen)
+__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, simdlen)
+__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, grainsize)
+__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, nogroup)
+__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, num_tasks)
+__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, in_reduction)
+__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, allocate)
+__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 50, ~0, nontemporal)
+__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 50, ~0, order)
+
+__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, shared)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, lastprivate)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, default)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, collapse)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, final)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, untied)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, mergeable)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, priority)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, grainsize)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, nogroup)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, num_tasks)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, in_reduction)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, allocate)
+
+__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, shared)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, lastprivate)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, default)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, collapse)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, final)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, untied)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, mergeable)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, priority)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, linear)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, aligned)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, safelen)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, simdlen)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, grainsize)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, nogroup)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, num_tasks)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, in_reduction)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, allocate)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 50, ~0, nontemporal)
+__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 50, ~0, order)
+
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, shared)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, lastprivate)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, default)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, collapse)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, final)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, untied)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, mergeable)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, priority)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, grainsize)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, nogroup)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, num_tasks)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, allocate)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, num_threads)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, proc_bind)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, copyin)
+
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, shared)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, lastprivate)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, default)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, collapse)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, final)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, untied)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, mergeable)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, priority)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, grainsize)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, nogroup)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, num_tasks)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, allocate)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, num_threads)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, proc_bind)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, copyin)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, linear)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, aligned)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, safelen)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, simdlen)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 50, ~0, nontemporal)
+__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 50, ~0, order)
+
+__OMP_DIRECTIVE_CLAUSE(critical, 1, ~0, hint)
+
+__OMP_DIRECTIVE_CLAUSE(distribute, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(distribute, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(distribute, 1, ~0, lastprivate)
+__OMP_DIRECTIVE_CLAUSE(distribute, 1, ~0, collapse)
+__OMP_DIRECTIVE_CLAUSE(distribute, 1, ~0, dist_schedule)
+__OMP_DIRECTIVE_CLAUSE(distribute, 1, ~0, allocate)
+
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 1, ~0, lastprivate)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 1, ~0, collapse)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 1, ~0, dist_schedule)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 1, ~0, num_threads)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 1, ~0, default)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 1, ~0, proc_bind)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 1, ~0, shared)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 1, ~0, copyin)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 1, ~0, schedule)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 1, ~0, allocate)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 50, ~0, order)
+
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, lastprivate)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, collapse)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, dist_schedule)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, num_threads)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, default)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, proc_bind)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, shared)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, copyin)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, schedule)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, linear)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, aligned)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, safelen)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, simdlen)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, allocate)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 50, ~0, nontemporal)
+__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 50, ~0, order)
+
+__OMP_DIRECTIVE_CLAUSE(distribute_simd, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(distribute_simd, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(distribute_simd, 1, ~0, lastprivate)
+__OMP_DIRECTIVE_CLAUSE(distribute_simd, 1, ~0, collapse)
+__OMP_DIRECTIVE_CLAUSE(distribute_simd, 1, ~0, dist_schedule)
+__OMP_DIRECTIVE_CLAUSE(distribute_simd, 1, ~0, linear)
+__OMP_DIRECTIVE_CLAUSE(distribute_simd, 1, ~0, aligned)
+__OMP_DIRECTIVE_CLAUSE(distribute_simd, 1, ~0, safelen)
+__OMP_DIRECTIVE_CLAUSE(distribute_simd, 1, ~0, simdlen)
+__OMP_DIRECTIVE_CLAUSE(distribute_simd, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(distribute_simd, 1, ~0, allocate)
+__OMP_DIRECTIVE_CLAUSE(distribute_simd, 50, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(distribute_simd, 50, ~0, nontemporal)
+__OMP_DIRECTIVE_CLAUSE(distribute_simd, 50, ~0, order)
+
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, device)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, map)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, lastprivate)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, nowait)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, depend)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, defaultmap)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, num_threads)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, default)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, proc_bind)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, shared)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, collapse)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, schedule)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~1, ordered)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, linear)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, safelen)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, simdlen)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, aligned)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, is_device_ptr)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, allocate)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 50, ~0, nontemporal)
+__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 50, ~0, order)
+
+__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, device)
+__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, map)
+__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, nowait)
+__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, depend)
+__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, defaultmap)
+__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, is_device_ptr)
+__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, lastprivate)
+__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, linear)
+__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, aligned)
+__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, safelen)
+__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, simdlen)
+__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, collapse)
+__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, allocate)
+__OMP_DIRECTIVE_CLAUSE(target_simd, 50, ~0, nontemporal)
+__OMP_DIRECTIVE_CLAUSE(target_simd, 50, ~0, order)
+
+__OMP_DIRECTIVE_CLAUSE(teams_distribute, 1, ~0, default)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute, 1, ~0, shared)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute, 1, ~0, num_teams)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute, 1, ~0, thread_limit)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute, 1, ~0, lastprivate)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute, 1, ~0, collapse)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute, 1, ~0, dist_schedule)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute, 1, ~0, allocate)
+
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, default)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, shared)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, num_teams)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, thread_limit)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, lastprivate)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, collapse)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, dist_schedule)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, linear)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, aligned)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, safelen)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, simdlen)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, allocate)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 50, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 50, ~0, nontemporal)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 50, ~0, order)
+
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, lastprivate)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, collapse)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, dist_schedule)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, num_threads)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, default)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, proc_bind)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, shared)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, schedule)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, linear)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, aligned)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, safelen)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, simdlen)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, num_teams)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, thread_limit)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, allocate)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 50, ~0, nontemporal)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 50, ~0, order)
+
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, lastprivate)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, collapse)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, dist_schedule)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, num_threads)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, default)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, proc_bind)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, shared)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, schedule)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, num_teams)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, thread_limit)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, copyin)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, allocate)
+__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 50, ~0, order)
+
+__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, device)
+__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, map)
+__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, nowait)
+__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, depend)
+__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, defaultmap)
+__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, is_device_ptr)
+__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, default)
+__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, shared)
+__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, num_teams)
+__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, thread_limit)
+__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, allocate)
+
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, device)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, map)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, nowait)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, depend)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, defaultmap)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, is_device_ptr)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, default)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, shared)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, num_teams)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, thread_limit)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, lastprivate)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, collapse)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, dist_schedule)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, allocate)
+
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, device)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, map)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, nowait)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, depend)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, defaultmap)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0,
+                       firstprivate)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0,
+                       is_device_ptr)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, default)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, shared)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, num_teams)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0,
+                       thread_limit)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, lastprivate)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, collapse)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0,
+                       dist_schedule)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, num_threads)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, proc_bind)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, schedule)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, allocate)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 50, ~0, order)
+
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, device)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, map)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0,
+                       private)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, nowait)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, depend)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0,
+                       defaultmap)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0,
+                       firstprivate)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0,
+                       is_device_ptr)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0,
+                       default)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, shared)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0,
+                       reduction)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0,
+                       num_teams)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0,
+                       thread_limit)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0,
+                       lastprivate)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0,
+                       collapse)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0,
+                       dist_schedule)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0,
+                       num_threads)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0,
+                       proc_bind)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0,
+                       schedule)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, linear)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0,
+                       aligned)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0,
+                       safelen)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0,
+                       simdlen)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0,
+                       allocate)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 50, ~0,
+                       nontemporal)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 50, ~0, order)
+
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, if)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, device)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, map)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, private)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, nowait)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, depend)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, defaultmap)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, firstprivate)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, lastprivate)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, is_device_ptr)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, shared)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, reduction)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, num_teams)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, thread_limit)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, collapse)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, dist_schedule)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, linear)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, aligned)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, safelen)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, simdlen)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, allocate)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 50, ~0, nontemporal)
+__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 50, ~0, order)
+
+__OMP_DIRECTIVE_CLAUSE(taskgroup, 1, ~0, task_reduction)
+__OMP_DIRECTIVE_CLAUSE(taskgroup, 1, ~0, allocate)
+
+__OMP_DIRECTIVE_CLAUSE(declare_mapper, 1, ~0, map)
+
+__OMP_DIRECTIVE_CLAUSE(declare_variant, 1, ~0, match)
+
+__OMP_DIRECTIVE_CLAUSE(flush, 50, ~0, acq_rel)
+__OMP_DIRECTIVE_CLAUSE(flush, 50, ~0, acquire)
+__OMP_DIRECTIVE_CLAUSE(flush, 50, ~0, release)
+// TODO This should ne `none` instead
+__OMP_DIRECTIVE_CLAUSE(flush, 1, ~0, flush)
+
+__OMP_DIRECTIVE_CLAUSE(depobj, 50, ~0, depend)
+__OMP_DIRECTIVE_CLAUSE(depobj, 50, ~0, destroy)
+__OMP_DIRECTIVE_CLAUSE(depobj, 50, ~0, update)
+// TODO This should ne `none` instead
+__OMP_DIRECTIVE_CLAUSE(depobj, 50, ~0, depobj)
+
+#undef __OMP_DIRECTIVE_CLAUSE
+#undef OMP_DIRECTIVE_CLAUSE
+///}

diff  --git a/llvm/lib/Frontend/OpenMP/OMPConstants.cpp b/llvm/lib/Frontend/OpenMP/OMPConstants.cpp
index edd857d7b250..ed19ae38c698 100644
--- a/llvm/lib/Frontend/OpenMP/OMPConstants.cpp
+++ b/llvm/lib/Frontend/OpenMP/OMPConstants.cpp
@@ -54,6 +54,17 @@ StringRef llvm::omp::getOpenMPClauseName(Clause C) {
   llvm_unreachable("Invalid OpenMP clause kind");
 }
 
+bool llvm::omp::isAllowedClauseForDirective(Directive D, Clause C,
+                                            unsigned Version) {
+  assert(unsigned(D) <= unsigned(OMPD_unknown));
+  assert(unsigned(C) <= unsigned(OMPC_unknown));
+#define OMP_DIRECTIVE_CLAUSE(Dir, MinVersion, MaxVersion, Cl)                  \
+  if (D == Dir && C == Cl && MinVersion <= Version && MaxVersion >= Version)   \
+    return true;
+#include "llvm/Frontend/OpenMP/OMPKinds.def"
+  return false;
+}
+
 /// Declarations for LLVM-IR types (simple, array, function and structure) are
 /// generated below. Their names are defined and used in OpenMPKinds.def. Here
 /// we provide the declarations, the initializeTypes function will provide the


        


More information about the llvm-branch-commits mailing list