[flang] Make the second argument to dist_schedule optional.

Original-commit: flang-compiler/f18@7ed2d0e3ec
Reviewed-on: https://github.com/flang-compiler/f18/pull/772
Tree-same-pre-rewrite: false
This commit is contained in:
David Truby 2019-10-02 16:58:11 +01:00
parent 7292b3334c
commit 9aa80d3353
2 changed files with 4 additions and 3 deletions

View File

@ -186,8 +186,9 @@ TYPE_PARSER("ALIGNED" >>
construct<OmpClause>(parenthesized(Parser<OmpDependClause>{})) ||
"DEVICE" >> construct<OmpClause>(construct<OmpClause::Device>(
parenthesized(scalarIntExpr))) ||
"DIST_SCHEDULE" >> construct<OmpClause>(construct<OmpClause::DistSchedule>(
parenthesized("STATIC ," >> scalarIntExpr))) ||
"DIST_SCHEDULE" >>
construct<OmpClause>(construct<OmpClause::DistSchedule>(
parenthesized("STATIC" >> maybe("," >> scalarIntExpr)))) ||
"FINAL" >> construct<OmpClause>(construct<OmpClause::Final>(
parenthesized(scalarLogicalExpr))) ||
"FIRSTPRIVATE" >> construct<OmpClause>(construct<OmpClause::Firstprivate>(

View File

@ -3447,7 +3447,7 @@ struct OmpClause {
WRAPPER_CLASS(Copyin, OmpObjectList);
WRAPPER_CLASS(Copyprivate, OmpObjectList);
WRAPPER_CLASS(Device, ScalarIntExpr);
WRAPPER_CLASS(DistSchedule, ScalarIntExpr);
WRAPPER_CLASS(DistSchedule, std::optional<ScalarIntExpr>);
WRAPPER_CLASS(Final, ScalarLogicalExpr);
WRAPPER_CLASS(Firstprivate, OmpObjectList);
WRAPPER_CLASS(From, OmpObjectList);