diff --git a/flang/include/flang/Lower/OpenMP/Clauses.h b/flang/include/flang/Lower/OpenMP/Clauses.h index 3eff90b95a20d..737b535d604d6 100644 --- a/flang/include/flang/Lower/OpenMP/Clauses.h +++ b/flang/include/flang/Lower/OpenMP/Clauses.h @@ -246,7 +246,7 @@ using Initializer = tomp::clause::InitializerT; using InReduction = tomp::clause::InReductionT; using IsDevicePtr = tomp::clause::IsDevicePtrT; using Lastprivate = tomp::clause::LastprivateT; -using LoopRange = tomp::clause::LoopRangeT; +using Looprange = tomp::clause::LooprangeT; using Linear = tomp::clause::LinearT; using Link = tomp::clause::LinkT; using Map = tomp::clause::MapT; diff --git a/flang/include/flang/Parser/dump-parse-tree.h b/flang/include/flang/Parser/dump-parse-tree.h index f460e61fbb915..43cfe990d9469 100644 --- a/flang/include/flang/Parser/dump-parse-tree.h +++ b/flang/include/flang/Parser/dump-parse-tree.h @@ -643,7 +643,7 @@ class ParseTreeDumper { NODE_ENUM(OmpLinearModifier, Value) NODE(parser, OmpLocator) NODE(parser, OmpLocatorList) - NODE(parser, OmpLoopRangeClause) + NODE(parser, OmpLooprangeClause) NODE(parser, OmpMapClause) NODE(OmpMapClause, Modifier) NODE(parser, OmpMapper) diff --git a/flang/include/flang/Parser/parse-tree.h b/flang/include/flang/Parser/parse-tree.h index dd928e1244a2f..b6f15ba9bfd18 100644 --- a/flang/include/flang/Parser/parse-tree.h +++ b/flang/include/flang/Parser/parse-tree.h @@ -4666,10 +4666,10 @@ struct OmpLinearClause { // Ref: [6.0:207-208] // -// loop-range-clause -> +// looprange-clause -> // LOOPRANGE(first, count) // since 6.0 -struct OmpLoopRangeClause { - TUPLE_CLASS_BOILERPLATE(OmpLoopRangeClause); +struct OmpLooprangeClause { + TUPLE_CLASS_BOILERPLATE(OmpLooprangeClause); std::tuple t; }; diff --git a/flang/lib/Lower/OpenMP/Clauses.cpp b/flang/lib/Lower/OpenMP/Clauses.cpp index dc49a8118b0a5..61430fceafe2a 100644 --- a/flang/lib/Lower/OpenMP/Clauses.cpp +++ b/flang/lib/Lower/OpenMP/Clauses.cpp @@ -1076,7 +1076,7 @@ Link make(const parser::OmpClause::Link &inp, return Link{/*List=*/makeObjects(inp.v, semaCtx)}; } -LoopRange make(const parser::OmpClause::Looprange &inp, +Looprange make(const parser::OmpClause::Looprange &inp, semantics::SemanticsContext &semaCtx) { llvm_unreachable("Unimplemented: looprange"); } diff --git a/flang/lib/Parser/openmp-parsers.cpp b/flang/lib/Parser/openmp-parsers.cpp index bd259a9c6e01d..de26a1ba7910d 100644 --- a/flang/lib/Parser/openmp-parsers.cpp +++ b/flang/lib/Parser/openmp-parsers.cpp @@ -1278,7 +1278,7 @@ TYPE_PARSER( maybe(":"_tok >> nonemptyList(Parser{})), /*PostModified=*/pure(true))) -TYPE_PARSER(construct( +TYPE_PARSER(construct( scalarIntConstantExpr, "," >> scalarIntConstantExpr)) // OpenMPv5.2 12.5.2 detach-clause -> DETACH (event-handle) @@ -1471,7 +1471,7 @@ TYPE_PARSER( // "LINK" >> construct(construct( parenthesized(Parser{}))) || "LOOPRANGE" >> construct(construct( - parenthesized(Parser{}))) || + parenthesized(Parser{}))) || "MAP" >> construct(construct( parenthesized(Parser{}))) || "MATCH" >> construct(construct( diff --git a/flang/lib/Parser/unparse.cpp b/flang/lib/Parser/unparse.cpp index 8e9c7d04bc522..6deefa44ab0fc 100644 --- a/flang/lib/Parser/unparse.cpp +++ b/flang/lib/Parser/unparse.cpp @@ -2370,7 +2370,7 @@ class UnparseVisitor { } } } - void Unparse(const OmpLoopRangeClause &x) { + void Unparse(const OmpLooprangeClause &x) { Word("LOOPRANGE("); Walk(std::get<0>(x.t)); Put(", "); diff --git a/flang/test/Parser/OpenMP/fuse-looprange.f90 b/flang/test/Parser/OpenMP/fuse-looprange.f90 index 75ec15fddd65f..d6e6416175b33 100644 --- a/flang/test/Parser/OpenMP/fuse-looprange.f90 +++ b/flang/test/Parser/OpenMP/fuse-looprange.f90 @@ -28,7 +28,7 @@ subroutine openmp_fuse(x) !PARSE-TREE: OpenMPConstruct -> OpenMPLoopConstruct !PARSE-TREE: OmpBeginLoopDirective !PARSE-TREE: OmpDirectiveName -> llvm::omp::Directive = fuse -!PARSE-TREE: OmpClauseList -> OmpClause -> Looprange -> OmpLoopRangeClause +!PARSE-TREE: OmpClauseList -> OmpClause -> Looprange -> OmpLooprangeClause !PARSE-TREE: Scalar -> Integer -> Constant -> Expr = '1_4' !PARSE-TREE: LiteralConstant -> IntLiteralConstant = '1' !PARSE-TREE: Scalar -> Integer -> Constant -> Expr = '2_4' diff --git a/llvm/include/llvm/Frontend/OpenMP/ClauseT.h b/llvm/include/llvm/Frontend/OpenMP/ClauseT.h index 67ebafc89cf99..eb0e4a828eb1e 100644 --- a/llvm/include/llvm/Frontend/OpenMP/ClauseT.h +++ b/llvm/include/llvm/Frontend/OpenMP/ClauseT.h @@ -1307,7 +1307,7 @@ struct WriteT { }; // V6: [6.4.7] Looprange clause -template struct LoopRangeT { +template struct LooprangeT { using Begin = E; using End = E; @@ -1346,7 +1346,7 @@ using TupleClausesT = DoacrossT, DynGroupprivateT, FromT, GrainsizeT, IfT, InitT, InReductionT, LastprivateT, LinearT, - LoopRangeT, MapT, NumTasksT, + LooprangeT, MapT, NumTasksT, OrderT, ReductionT, ScheduleT, TaskReductionT, ToT>; diff --git a/llvm/include/llvm/Frontend/OpenMP/OMP.td b/llvm/include/llvm/Frontend/OpenMP/OMP.td index da70048d28c12..d9966068b605a 100644 --- a/llvm/include/llvm/Frontend/OpenMP/OMP.td +++ b/llvm/include/llvm/Frontend/OpenMP/OMP.td @@ -297,7 +297,7 @@ def OMPC_Link : Clause<[Spelling<"link">]> { } def OMPC_LoopRange : Clause<[Spelling<"looprange">]> { let clangClass = "OMPLoopRangeClause"; - let flangClass = "OmpLoopRangeClause"; + let flangClass = "OmpLooprangeClause"; } def OMPC_Map : Clause<[Spelling<"map">]> { let clangClass = "OMPMapClause";