[flang-commits] [flang] [flang][OpenMP]Add parsing support for MAP(MAPPER(name) ...) (PR #116274)
Krzysztof Parzyszek via flang-commits
flang-commits at lists.llvm.org
Fri Nov 15 09:43:22 PST 2024
================
@@ -3718,7 +3721,8 @@ struct OmpMapClause {
// The checks for satisfying those constraints are deferred to semantics.
// In OpenMP 5.2 the non-comma syntax has been deprecated: keep the
// information about separator presence to emit a diagnostic if needed.
- std::tuple<std::optional<std::list<TypeModifier>>,
+ std::tuple<OmpMapperIdentifier, // Mapper name
----------------
kparzysz wrote:
The way this was intended to work is that
1. You add `std::optional<std::list<YourModifier>>` to the tuple in here.
2. Add the mapper parser to the `ModParser` list in MapModifiers in openmp-parsers.cpp.
3. Unpack it in `makeMapClause` and pass it to the `OmpMapClause` constructor.
Then in check-omp-structure.cpp you can verify that there is at most one mapper modifier in the list, and print a meaningful message.
Having said that, I'm working on modifier verification right now, which will change how they are organized and parsed, so it's not a big deal if you leave it as is, since I'll have to change it anyway. (One problem with the current code that I'm trying to address is that the modifiers can be specified in any order, which the current parsers don't allow.)
https://github.com/llvm/llvm-project/pull/116274
More information about the flang-commits
mailing list