Skip to content

Commit 6fb36f0

Browse files
committed
[flang][OpenMP] Remove std::variant with single alternative, NFC
1 parent bbcd352 commit 6fb36f0

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3695,9 +3695,8 @@ struct OmpMapClause {
36953695

36963696
// 2.9.5 order-clause -> ORDER ([order-modifier :]concurrent)
36973697
struct OmpOrderModifier {
3698-
UNION_CLASS_BOILERPLATE(OmpOrderModifier);
36993698
ENUM_CLASS(Kind, Reproducible, Unconstrained)
3700-
std::variant<Kind> u;
3699+
WRAPPER_CLASS_BOILERPLATE(OmpOrderModifier, Kind);
37013700
};
37023701

37033702
struct OmpOrderClause {

flang/lib/Lower/OpenMP/Clauses.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,8 +1092,7 @@ Order make(const parser::OmpClause::Order &inp,
10921092
auto &t1 = std::get<wrapped::Type>(inp.v.t);
10931093

10941094
auto convert3 = [&](const parser::OmpOrderModifier &s) {
1095-
return Fortran::common::visit(
1096-
[&](parser::OmpOrderModifier::Kind k) { return convert1(k); }, s.u);
1095+
return convert1(s.v);
10971096
};
10981097
return Order{
10991098
{/*OrderModifier=*/maybeApply(convert3, t0), /*Ordering=*/convert2(t1)}};

0 commit comments

Comments
 (0)