[flang-commits] [flang] [OpenMP][Flang] Emit default declare mappers implicitly for derived types (PR #140562)

Sergio Afonso via flang-commits flang-commits at lists.llvm.org
Tue Jul 1 08:01:35 PDT 2025


================
@@ -3540,7 +3540,7 @@ WRAPPER_CLASS(OmpLocatorList, std::list<OmpLocator>);
 struct OmpMapperSpecifier {
   // Absent mapper-identifier is equivalent to DEFAULT.
   TUPLE_CLASS_BOILERPLATE(OmpMapperSpecifier);
-  std::tuple<std::optional<Name>, TypeSpec, Name> t;
+  std::tuple<std::string, TypeSpec, Name> t;
----------------
skatrak wrote:

Since we haven't figured out a better alternative for this situation, I think we can hopefully get away with making this PFT node owner of the identifier name for now.

However, this is a departure from the convention of only storing references to externally allocated strings, so I'd suggest adding a comment here to explain why we're making an exception (i.e. this identifier might be compiler-generated and not part of the source).

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


More information about the flang-commits mailing list