[flang-commits] [flang] [flang][OpenMP] Parsing support for map type modifiers (PR #111860)
Krzysztof Parzyszek via flang-commits
flang-commits at lists.llvm.org
Fri Oct 11 06:52:39 PDT 2024
================
@@ -2073,11 +2073,24 @@ class UnparseVisitor {
":");
Walk(std::get<OmpObjectList>(x.t));
}
- void Unparse(const OmpMapType::Always &) { Word("ALWAYS,"); }
void Unparse(const OmpMapClause &x) {
- Walk(std::get<std::optional<OmpMapType>>(x.t), ":");
+ auto &typeMod =
+ std::get<std::optional<std::list<OmpMapClause::TypeModifier>>>(x.t);
+ auto &type = std::get<std::optional<OmpMapClause::Type>>(x.t);
+ Walk(typeMod);
+ if (typeMod.has_value() && type.has_value())
+ Put(", ");
+ Walk(type);
+ if (typeMod.has_value() || type.has_value())
+ Put(": ");
Walk(std::get<OmpObjectList>(x.t));
}
+ void Unparse(const OmpMapClause::TypeModifier &x) {
+ if (x == OmpMapClause::TypeModifier::OmpxHold)
+ Word("OMPX_HOLD");
----------------
kparzysz wrote:
Because the enum name is "OmpxHold". The EnumToString returns "OMPXHOLD" for it, but it needs the underscore.
https://github.com/llvm/llvm-project/pull/111860
More information about the flang-commits
mailing list