@@ -773,7 +773,14 @@ TYPE_PARSER(construct<OmpSeverityClause>(
773773
774774TYPE_PARSER(construct<OmpMessageClause>(expr))
775775
776- TYPE_PARSER(
776+ TYPE_PARSER(construct<OmpHoldsClause>(indirect(expr)))
777+ TYPE_PARSER(construct<OmpAbsentClause>(many(maybe(","_tok) >>
778+ construct<llvm::omp::Directive>(OmpDirectiveNameParser{}))))
779+ TYPE_PARSER(construct<OmpContainsClause>(many(maybe(","_tok) >>
780+ construct<llvm::omp::Directive>(OmpDirectiveNameParser{}))))
781+
782+ TYPE_PARSER("ABSENT" >> construct<OmpClause>(construct<OmpClause::Absent>(
783+ parenthesized(Parser<OmpAbsentClause>{}))) ||
777784 "ACQUIRE" >> construct<OmpClause>(construct<OmpClause::Acquire>()) ||
778785 "ACQ_REL" >> construct<OmpClause>(construct<OmpClause::AcqRel>()) ||
779786 "AFFINITY" >> construct<OmpClause>(construct<OmpClause::Affinity>(
@@ -795,6 +802,8 @@ TYPE_PARSER(
795802 parenthesized(Parser<OmpBindClause>{}))) ||
796803 "COLLAPSE" >> construct<OmpClause>(construct<OmpClause::Collapse>(
797804 parenthesized(scalarIntConstantExpr))) ||
805+ "CONTAINS" >> construct<OmpClause>(construct<OmpClause::Contains>(
806+ parenthesized(Parser<OmpContainsClause>{}))) ||
798807 "COPYIN" >> construct<OmpClause>(construct<OmpClause::Copyin>(
799808 parenthesized(Parser<OmpObjectList>{}))) ||
800809 "COPYPRIVATE" >> construct<OmpClause>(construct<OmpClause::Copyprivate>(
@@ -839,6 +848,8 @@ TYPE_PARSER(
839848 parenthesized(Parser<OmpObjectList>{}))) ||
840849 "HINT" >> construct<OmpClause>(
841850 construct<OmpClause::Hint>(parenthesized(constantExpr))) ||
851+ "HOLDS" >> construct<OmpClause>(construct<OmpClause::Holds>(
852+ parenthesized(Parser<OmpHoldsClause>{}))) ||
842853 "IF" >> construct<OmpClause>(construct<OmpClause::If>(
843854 parenthesized(Parser<OmpIfClause>{}))) ||
844855 "INBRANCH" >> construct<OmpClause>(construct<OmpClause::Inbranch>()) ||
@@ -869,6 +880,11 @@ TYPE_PARSER(
869880 "NOVARIANTS" >> construct<OmpClause>(construct<OmpClause::Novariants>(
870881 parenthesized(scalarLogicalExpr))) ||
871882 "NOWAIT" >> construct<OmpClause>(construct<OmpClause::Nowait>()) ||
883+ "NO_OPENMP"_id >> construct<OmpClause>(construct<OmpClause::NoOpenmp>()) ||
884+ "NO_OPENMP_ROUTINES" >>
885+ construct<OmpClause>(construct<OmpClause::NoOpenmpRoutines>()) ||
886+ "NO_PARALLELISM" >>
887+ construct<OmpClause>(construct<OmpClause::NoParallelism>()) ||
872888 "NUM_TASKS" >> construct<OmpClause>(construct<OmpClause::NumTasks>(
873889 parenthesized(Parser<OmpNumTasksClause>{}))) ||
874890 "NUM_TEAMS" >> construct<OmpClause>(construct<OmpClause::NumTeams>(
@@ -1299,28 +1315,45 @@ TYPE_PARSER(
12991315 parenthesized(Parser<OmpObjectList>{}), Parser<OmpClauseList>{})) /
13001316 lookAhead(endOmpLine / !statement(allocateStmt)))
13011317
1318+ // Assumes Construct
1319+ TYPE_PARSER(sourced(construct<OpenMPDeclarativeAssumes>(
1320+ verbatim("ASSUMES"_tok), Parser<OmpClauseList>{})))
1321+
13021322// Declarative constructs
1303- TYPE_PARSER(startOmpLine >>
1304- withMessage("expected OpenMP construct"_err_en_US,
1305- sourced(construct<OpenMPDeclarativeConstruct>(
1306- Parser<OpenMPDeclareReductionConstruct>{}) ||
1307- construct<OpenMPDeclarativeConstruct>(
1308- Parser<OpenMPDeclareMapperConstruct>{}) ||
1309- construct<OpenMPDeclarativeConstruct>(
1310- Parser<OpenMPDeclareSimdConstruct>{}) ||
1311- construct<OpenMPDeclarativeConstruct>(
1312- Parser<OpenMPDeclareTargetConstruct>{}) ||
1313- construct<OpenMPDeclarativeConstruct>(
1314- Parser<OpenMPDeclarativeAllocate>{}) ||
1315- construct<OpenMPDeclarativeConstruct>(
1316- Parser<OpenMPRequiresConstruct>{}) ||
1317- construct<OpenMPDeclarativeConstruct>(
1318- Parser<OpenMPThreadprivate>{}) ||
1319- construct<OpenMPDeclarativeConstruct>(
1320- Parser<OpenMPUtilityConstruct>{}) ||
1321- construct<OpenMPDeclarativeConstruct>(
1322- Parser<OmpMetadirectiveDirective>{})) /
1323- endOmpLine))
1323+ TYPE_PARSER(
1324+ startOmpLine >> withMessage("expected OpenMP construct"_err_en_US,
1325+ sourced(construct<OpenMPDeclarativeConstruct>(
1326+ Parser<OpenMPDeclarativeAssumes>{}) ||
1327+ construct<OpenMPDeclarativeConstruct>(
1328+ Parser<OpenMPDeclareReductionConstruct>{}) ||
1329+ construct<OpenMPDeclarativeConstruct>(
1330+ Parser<OpenMPDeclareMapperConstruct>{}) ||
1331+ construct<OpenMPDeclarativeConstruct>(
1332+ Parser<OpenMPDeclareSimdConstruct>{}) ||
1333+ construct<OpenMPDeclarativeConstruct>(
1334+ Parser<OpenMPDeclareTargetConstruct>{}) ||
1335+ construct<OpenMPDeclarativeConstruct>(
1336+ Parser<OpenMPDeclarativeAllocate>{}) ||
1337+ construct<OpenMPDeclarativeConstruct>(
1338+ Parser<OpenMPRequiresConstruct>{}) ||
1339+ construct<OpenMPDeclarativeConstruct>(
1340+ Parser<OpenMPThreadprivate>{}) ||
1341+ construct<OpenMPDeclarativeConstruct>(
1342+ Parser<OpenMPUtilityConstruct>{}) ||
1343+ construct<OpenMPDeclarativeConstruct>(
1344+ Parser<OmpMetadirectiveDirective>{})) /
1345+ endOmpLine))
1346+
1347+ // Assume Construct
1348+ TYPE_PARSER(sourced(construct<OmpAssumeDirective>(
1349+ verbatim("ASSUME"_tok), Parser<OmpClauseList>{})))
1350+
1351+ TYPE_PARSER(sourced(construct<OmpEndAssumeDirective>(
1352+ verbatim(startOmpLine >> "END ASSUME"_tok))))
1353+
1354+ TYPE_PARSER(sourced(
1355+ construct<OpenMPAssumeConstruct>(Parser<OmpAssumeDirective>{} / endOmpLine,
1356+ block, maybe(Parser<OmpEndAssumeDirective>{} / endOmpLine))))
13241357
13251358// Block Construct
13261359TYPE_PARSER(construct<OpenMPBlockConstruct>(
@@ -1369,6 +1402,7 @@ TYPE_CONTEXT_PARSER("OpenMP construct"_en_US,
13691402 construct<OpenMPConstruct>(Parser<OpenMPExecutableAllocate>{}),
13701403 construct<OpenMPConstruct>(Parser<OpenMPAllocatorsConstruct>{}),
13711404 construct<OpenMPConstruct>(Parser<OpenMPDeclarativeAllocate>{}),
1405+ construct<OpenMPConstruct>(Parser<OpenMPAssumeConstruct>{}),
13721406 construct<OpenMPConstruct>(Parser<OpenMPCriticalConstruct>{}))))
13731407
13741408// END OMP Block directives
0 commit comments