aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/OpenMPKinds.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2020-02-06 16:30:23 -0500
committerAlexey Bataev <a.bataev@hotmail.com>2020-02-07 09:21:10 -0500
commitea9166b5a838d788a4ec0c9ddf0c83b09f49cfe4 (patch)
tree11b0e3ef80050fc589941f9851869e94e406fb3a /clang/lib/Basic/OpenMPKinds.cpp
parent2db5547c016dbbd6acac3f3175937324f0095226 (diff)
downloadllvm-ea9166b5a838d788a4ec0c9ddf0c83b09f49cfe4.zip
llvm-ea9166b5a838d788a4ec0c9ddf0c83b09f49cfe4.tar.gz
llvm-ea9166b5a838d788a4ec0c9ddf0c83b09f49cfe4.tar.bz2
[OPENMP50]Add parsing/sema for acq_rel clause.
Added basic support (representation + parsing/sema/(de)serialization) for acq_rel clause in flush/atomic directives.
Diffstat (limited to 'clang/lib/Basic/OpenMPKinds.cpp')
-rw-r--r--clang/lib/Basic/OpenMPKinds.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/clang/lib/Basic/OpenMPKinds.cpp b/clang/lib/Basic/OpenMPKinds.cpp
index 3204e22..8937e87 100644
--- a/clang/lib/Basic/OpenMPKinds.cpp
+++ b/clang/lib/Basic/OpenMPKinds.cpp
@@ -214,6 +214,7 @@ unsigned clang::getOpenMPSimpleClauseType(OpenMPClauseKind Kind,
case OMPC_update:
case OMPC_capture:
case OMPC_seq_cst:
+ case OMPC_acq_rel:
case OMPC_device:
case OMPC_threads:
case OMPC_simd:
@@ -426,6 +427,7 @@ const char *clang::getOpenMPSimpleClauseTypeName(OpenMPClauseKind Kind,
case OMPC_update:
case OMPC_capture:
case OMPC_seq_cst:
+ case OMPC_acq_rel:
case OMPC_device:
case OMPC_threads:
case OMPC_simd:
@@ -577,9 +579,22 @@ bool clang::isAllowedClauseForDirective(OpenMPDirectiveKind DKind,
}
break;
case OMPD_flush:
- return CKind == OMPC_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_atomic:
+ if (OpenMPVersion < 50 && CKind == OMPC_acq_rel)
+ return false;
switch (CKind) {
#define OPENMP_ATOMIC_CLAUSE(Name) \
case OMPC_##Name: \