Skip to content

Commit 8fb1b3f

Browse files
authored
[flang][OpenMP] 'no_openmp_constructs' added to clang broke flang build (#126145)
Adding 'no_openmp_constructs' assumption clause to clang broke the flang build. Adding to flang so it builds. Testing - Build - Testing: check-all
1 parent 5399782 commit 8fb1b3f

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

flang/lib/Lower/OpenMP/Clauses.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ MAKE_EMPTY_CLASS(Mergeable, Mergeable);
202202
MAKE_EMPTY_CLASS(Nogroup, Nogroup);
203203
MAKE_EMPTY_CLASS(NoOpenmp, NoOpenmp);
204204
MAKE_EMPTY_CLASS(NoOpenmpRoutines, NoOpenmpRoutines);
205+
MAKE_EMPTY_CLASS(NoOpenmpConstructs, NoOpenmpConstructs);
205206
MAKE_EMPTY_CLASS(NoParallelism, NoParallelism);
206207
MAKE_EMPTY_CLASS(Notinbranch, Notinbranch);
207208
MAKE_EMPTY_CLASS(Nowait, Nowait);
@@ -1035,6 +1036,7 @@ Nontemporal make(const parser::OmpClause::Nontemporal &inp,
10351036

10361037
// NoOpenmp: empty
10371038
// NoOpenmpRoutines: empty
1039+
// NoOpenmpConstructs: empty
10381040
// NoParallelism: empty
10391041
// Notinbranch: empty
10401042

flang/lib/Lower/OpenMP/Clauses.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,8 @@ using Mergeable = tomp::clause::MergeableT<TypeTy, IdTy, ExprTy>;
242242
using Message = tomp::clause::MessageT<TypeTy, IdTy, ExprTy>;
243243
using NoOpenmp = tomp::clause::NoOpenmpT<TypeTy, IdTy, ExprTy>;
244244
using NoOpenmpRoutines = tomp::clause::NoOpenmpRoutinesT<TypeTy, IdTy, ExprTy>;
245+
using NoOpenmpConstructs =
246+
tomp::clause::NoOpenmpConstructsT<TypeTy, IdTy, ExprTy>;
245247
using NoParallelism = tomp::clause::NoParallelismT<TypeTy, IdTy, ExprTy>;
246248
using Nocontext = tomp::clause::NocontextT<TypeTy, IdTy, ExprTy>;
247249
using Nogroup = tomp::clause::NogroupT<TypeTy, IdTy, ExprTy>;

flang/lib/Semantics/check-omp-structure.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2966,6 +2966,7 @@ CHECK_SIMPLE_CLAUSE(Indirect, OMPC_indirect)
29662966
CHECK_SIMPLE_CLAUSE(Mergeable, OMPC_mergeable)
29672967
CHECK_SIMPLE_CLAUSE(NoOpenmp, OMPC_no_openmp)
29682968
CHECK_SIMPLE_CLAUSE(NoOpenmpRoutines, OMPC_no_openmp_routines)
2969+
CHECK_SIMPLE_CLAUSE(NoOpenmpConstructs, OMPC_no_openmp_constructs)
29692970
CHECK_SIMPLE_CLAUSE(NoParallelism, OMPC_no_parallelism)
29702971
CHECK_SIMPLE_CLAUSE(Nogroup, OMPC_nogroup)
29712972
CHECK_SIMPLE_CLAUSE(Notinbranch, OMPC_notinbranch)

llvm/include/llvm/Frontend/OpenMP/ClauseT.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,6 +846,12 @@ struct NoOpenmpRoutinesT {
846846
using EmptyTrait = std::true_type;
847847
};
848848

849+
// V6.0: [10.6.1] `assumption` clauses
850+
template <typename T, typename I, typename E> //
851+
struct NoOpenmpConstructsT {
852+
using EmptyTrait = std::true_type;
853+
};
854+
849855
// V5.2: [8.3.1] `assumption` clauses
850856
template <typename T, typename I, typename E> //
851857
struct NoParallelismT {
@@ -1239,7 +1245,7 @@ using EmptyClausesT = std::variant<
12391245
ReverseOffloadT<T, I, E>, SeqCstT<T, I, E>, SimdT<T, I, E>,
12401246
ThreadsT<T, I, E>, UnifiedAddressT<T, I, E>, UnifiedSharedMemoryT<T, I, E>,
12411247
UnknownT<T, I, E>, UntiedT<T, I, E>, UseT<T, I, E>, WeakT<T, I, E>,
1242-
WriteT<T, I, E>>;
1248+
WriteT<T, I, E>, NoOpenmpConstructsT<T, I, E>>;
12431249

12441250
template <typename T, typename I, typename E>
12451251
using IncompleteClausesT =

0 commit comments

Comments
 (0)