[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
================
@@ -1639,6 +1641,14 @@ bool OmpVisitor::Pre(const parser::OpenMPDeclareMapperConstruct &x) {
return false;
}
+bool OmpVisitor::Pre(const parser::OmpMapClause &x) {
+ const auto &mid{std::get<parser::OmpMapperIdentifier>(x.t)};
+ if (const auto &mapperName{mid.v})
+ mapperName->symbol =
+ &MakeSymbol(*mapperName, MiscDetails{MiscDetails::Kind::ConstructName});
----------------
kparzysz wrote:
IIUC, the MAPPER modifier should refer to a preexisting identifier, so this should be a name lookup, not creating a new symbol. The DECLARE MAPPER should declare the identifier (and create the symbol). If the lookup fails, you could create a dummy, and report it as an error later on.
https://github.com/llvm/llvm-project/pull/116274
More information about the flang-commits
mailing list