[flang-commits] [flang] [Flang][OMP]Add support for DECLARE MAPPER parsing and semantics (PR #115160)

Akash Banerjee via flang-commits flang-commits at lists.llvm.org
Wed Nov 6 06:31:10 PST 2024


================
@@ -836,6 +836,16 @@ TYPE_PARSER(
 TYPE_PARSER(sourced(construct<OpenMPDeclareTargetConstruct>(
     verbatim("DECLARE TARGET"_tok), Parser<OmpDeclareTargetSpecifier>{})))
 
+// declare-mapper-specifier
+TYPE_PARSER(construct<OmpDeclareMapperSpecifier>(
+    maybe(name / ":" / !":"_tok), typeSpec / "::", name))
+
+// ?.? (not 4.5) Declare Mapper Construct
+TYPE_PARSER(sourced(
+    construct<OpenMPDeclareMapperConstruct>(verbatim("DECLARE MAPPER"_tok),
+        "(" >> Parser<OmpDeclareMapperSpecifier>{} / ")",
+        many("MAP" >> parenthesized(many(Parser<OmpMapClause>{}))))))
----------------
TIFitis wrote:

I think we should use the existing `Parser<OmpClauseList>{}`
```suggestion
        Parser<OmpClauseList>{})))
```

https://github.com/llvm/llvm-project/pull/115160


More information about the flang-commits mailing list