Skip to content

Commit cb5362a

Browse files
authored
[flang][OpenMP] Rename OmpLoopRangeClause to OmpLooprangeClause, NFC (llvm#170370)
The convention is to change spelling from snake_case to UpperCamel, and use the result as a stem in derived names, e.g. - spelling is "some_clause" -> stem is SomeClause - spelling is "someclause" -> stem is Someclause Member of the OmpClause variant is <stem> itself, e.g. Looprange as in parser::OmpClause::Looprange. Specific clause class name is Omp<stem>Clause, e.g. OmpLooprangeClause.
1 parent 21d006c commit cb5362a

File tree

9 files changed

+13
-13
lines changed

9 files changed

+13
-13
lines changed

flang/include/flang/Lower/OpenMP/Clauses.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ using Initializer = tomp::clause::InitializerT<TypeTy, IdTy, ExprTy>;
246246
using InReduction = tomp::clause::InReductionT<TypeTy, IdTy, ExprTy>;
247247
using IsDevicePtr = tomp::clause::IsDevicePtrT<TypeTy, IdTy, ExprTy>;
248248
using Lastprivate = tomp::clause::LastprivateT<TypeTy, IdTy, ExprTy>;
249-
using LoopRange = tomp::clause::LoopRangeT<TypeTy, IdTy, ExprTy>;
249+
using Looprange = tomp::clause::LooprangeT<TypeTy, IdTy, ExprTy>;
250250
using Linear = tomp::clause::LinearT<TypeTy, IdTy, ExprTy>;
251251
using Link = tomp::clause::LinkT<TypeTy, IdTy, ExprTy>;
252252
using Map = tomp::clause::MapT<TypeTy, IdTy, ExprTy>;

flang/include/flang/Parser/dump-parse-tree.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ class ParseTreeDumper {
645645
NODE_ENUM(OmpLinearModifier, Value)
646646
NODE(parser, OmpLocator)
647647
NODE(parser, OmpLocatorList)
648-
NODE(parser, OmpLoopRangeClause)
648+
NODE(parser, OmpLooprangeClause)
649649
NODE(parser, OmpMapClause)
650650
NODE(OmpMapClause, Modifier)
651651
NODE(parser, OmpMapper)

flang/include/flang/Parser/parse-tree.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4672,10 +4672,10 @@ struct OmpLinearClause {
46724672

46734673
// Ref: [6.0:207-208]
46744674
//
4675-
// loop-range-clause ->
4675+
// looprange-clause ->
46764676
// LOOPRANGE(first, count) // since 6.0
4677-
struct OmpLoopRangeClause {
4678-
TUPLE_CLASS_BOILERPLATE(OmpLoopRangeClause);
4677+
struct OmpLooprangeClause {
4678+
TUPLE_CLASS_BOILERPLATE(OmpLooprangeClause);
46794679
std::tuple<ScalarIntConstantExpr, ScalarIntConstantExpr> t;
46804680
};
46814681

flang/lib/Lower/OpenMP/Clauses.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1076,7 +1076,7 @@ Link make(const parser::OmpClause::Link &inp,
10761076
return Link{/*List=*/makeObjects(inp.v, semaCtx)};
10771077
}
10781078

1079-
LoopRange make(const parser::OmpClause::Looprange &inp,
1079+
Looprange make(const parser::OmpClause::Looprange &inp,
10801080
semantics::SemanticsContext &semaCtx) {
10811081
llvm_unreachable("Unimplemented: looprange");
10821082
}

flang/lib/Parser/openmp-parsers.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,7 +1278,7 @@ TYPE_PARSER(
12781278
maybe(":"_tok >> nonemptyList(Parser<OmpLinearClause::Modifier>{})),
12791279
/*PostModified=*/pure(true)))
12801280

1281-
TYPE_PARSER(construct<OmpLoopRangeClause>(
1281+
TYPE_PARSER(construct<OmpLooprangeClause>(
12821282
scalarIntConstantExpr, "," >> scalarIntConstantExpr))
12831283

12841284
// OpenMPv5.2 12.5.2 detach-clause -> DETACH (event-handle)
@@ -1471,7 +1471,7 @@ TYPE_PARSER( //
14711471
"LINK" >> construct<OmpClause>(construct<OmpClause::Link>(
14721472
parenthesized(Parser<OmpObjectList>{}))) ||
14731473
"LOOPRANGE" >> construct<OmpClause>(construct<OmpClause::Looprange>(
1474-
parenthesized(Parser<OmpLoopRangeClause>{}))) ||
1474+
parenthesized(Parser<OmpLooprangeClause>{}))) ||
14751475
"MAP" >> construct<OmpClause>(construct<OmpClause::Map>(
14761476
parenthesized(Parser<OmpMapClause>{}))) ||
14771477
"MATCH" >> construct<OmpClause>(construct<OmpClause::Match>(

flang/lib/Parser/unparse.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2389,7 +2389,7 @@ class UnparseVisitor {
23892389
}
23902390
}
23912391
}
2392-
void Unparse(const OmpLoopRangeClause &x) {
2392+
void Unparse(const OmpLooprangeClause &x) {
23932393
Word("LOOPRANGE(");
23942394
Walk(std::get<0>(x.t));
23952395
Put(", ");

flang/test/Parser/OpenMP/fuse-looprange.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ subroutine openmp_fuse(x)
2828
!PARSE-TREE: OpenMPConstruct -> OpenMPLoopConstruct
2929
!PARSE-TREE: OmpBeginLoopDirective
3030
!PARSE-TREE: OmpDirectiveName -> llvm::omp::Directive = fuse
31-
!PARSE-TREE: OmpClauseList -> OmpClause -> Looprange -> OmpLoopRangeClause
31+
!PARSE-TREE: OmpClauseList -> OmpClause -> Looprange -> OmpLooprangeClause
3232
!PARSE-TREE: Scalar -> Integer -> Constant -> Expr = '1_4'
3333
!PARSE-TREE: LiteralConstant -> IntLiteralConstant = '1'
3434
!PARSE-TREE: Scalar -> Integer -> Constant -> Expr = '2_4'

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ struct WriteT {
13071307
};
13081308

13091309
// V6: [6.4.7] Looprange clause
1310-
template <typename T, typename I, typename E> struct LoopRangeT {
1310+
template <typename T, typename I, typename E> struct LooprangeT {
13111311
using Begin = E;
13121312
using End = E;
13131313

@@ -1346,7 +1346,7 @@ using TupleClausesT =
13461346
DoacrossT<T, I, E>, DynGroupprivateT<T, I, E>, FromT<T, I, E>,
13471347
GrainsizeT<T, I, E>, IfT<T, I, E>, InitT<T, I, E>,
13481348
InReductionT<T, I, E>, LastprivateT<T, I, E>, LinearT<T, I, E>,
1349-
LoopRangeT<T, I, E>, MapT<T, I, E>, NumTasksT<T, I, E>,
1349+
LooprangeT<T, I, E>, MapT<T, I, E>, NumTasksT<T, I, E>,
13501350
OrderT<T, I, E>, ReductionT<T, I, E>, ScheduleT<T, I, E>,
13511351
TaskReductionT<T, I, E>, ToT<T, I, E>>;
13521352

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ def OMPC_Link : Clause<[Spelling<"link">]> {
297297
}
298298
def OMPC_LoopRange : Clause<[Spelling<"looprange">]> {
299299
let clangClass = "OMPLoopRangeClause";
300-
let flangClass = "OmpLoopRangeClause";
300+
let flangClass = "OmpLooprangeClause";
301301
}
302302
def OMPC_Map : Clause<[Spelling<"map">]> {
303303
let clangClass = "OMPMapClause";

0 commit comments

Comments
 (0)