Skip to content

Commit 13d5398

Browse files
committed
[OpenMP] Fix Coexecute definitions
1 parent 759ca74 commit 13d5398

File tree

1 file changed

+14
-3
lines changed
  • llvm/include/llvm/Frontend/OpenMP

1 file changed

+14
-3
lines changed

llvm/include/llvm/Frontend/OpenMP/OMP.td

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,10 @@ def OMP_CancellationPoint : Directive<"cancellation point"> {
667667
let association = AS_None;
668668
let category = CA_Executable;
669669
}
670-
def OMP_Coexecute : Directive<"coexecute"> {}
670+
def OMP_Coexecute : Directive<"coexecute"> {
671+
let association = AS_Block;
672+
let category = CA_Executable;
673+
}
671674
def OMP_Critical : Directive<"critical"> {
672675
let allowedOnceClauses = [
673676
VersionedClause<OMPC_Hint>,
@@ -718,7 +721,11 @@ def OMP_DeclareTarget : Directive<"declare target"> {
718721
let association = AS_None;
719722
let category = CA_Declarative;
720723
}
721-
def OMP_EndCoexecute : Directive<"end coexecute"> {}
724+
def OMP_EndCoexecute : Directive<"end coexecute"> {
725+
let leafConstructs = OMP_Coexecute.leafConstructs;
726+
let association = OMP_Coexecute.association;
727+
let category = OMP_Coexecute.category;
728+
}
722729
def OMP_EndDeclareTarget : Directive<"end declare target"> {
723730
let association = AS_Delimited;
724731
let category = OMP_DeclareTarget.category;
@@ -2194,8 +2201,10 @@ def OMP_TargetTeamsCoexecute : Directive<"target teams coexecute"> {
21942201
VersionedClause<OMPC_NumTeams>,
21952202
VersionedClause<OMPC_ThreadLimit>,
21962203
VersionedClause<OMPC_OMPX_DynCGroupMem>,
2197-
VersionedClause<OMPC_OMX_Bare>,
2204+
VersionedClause<OMPC_OMPX_Bare>,
21982205
];
2206+
let leafConstructs = [OMP_Target, OMP_Teams, OMP_Coexecute];
2207+
let category = CA_Executable;
21992208
}
22002209
def OMP_TargetTeamsDistribute : Directive<"target teams distribute"> {
22012210
let allowedClauses = [
@@ -2490,6 +2499,8 @@ def OMP_TeamsCoexecute : Directive<"teams coexecute"> {
24902499
VersionedClause<OMPC_NumTeams>,
24912500
VersionedClause<OMPC_ThreadLimit>
24922501
];
2502+
let leafConstructs = [OMP_Target, OMP_Teams];
2503+
let category = CA_Executable;
24932504
}
24942505
def OMP_TeamsDistribute : Directive<"teams distribute"> {
24952506
let allowedClauses = [

0 commit comments

Comments
 (0)