[flang-commits] [flang] [Flang][OpenMP] Update declare mapper lookup via use-module (PR #163860)

Akash Banerjee via flang-commits flang-commits at lists.llvm.org
Fri Oct 24 11:32:53 PDT 2025


================
@@ -1098,6 +1100,16 @@ void ModFileWriter::PutUserReduction(
   }
 }
 
+static void PutMapper(
+    llvm::raw_ostream &os, const Symbol &symbol, SemanticsContext &context) {
+  const auto &details{symbol.get<MapperDetails>()};
+  // Emit each saved DECLARE MAPPER construct as-is, so that consumers of the
+  // module can reparse it and recreate the mapper symbol and semantics state.
+  for (const auto *decl : details.GetDeclList()) {
+    Unparse(os, *decl, context.langOptions());
+  }
+}
+
----------------
TIFitis wrote:

Done.

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


More information about the flang-commits mailing list