[flang-commits] [flang] [Flang][OpenMP] Update declare mapper lookup via use-module (PR #163860)
Kiran Chandramohan via flang-commits
flang-commits at lists.llvm.org
Fri Oct 24 03:58:22 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());
+ }
+}
+
----------------
kiranchandramohan wrote:
Can you add a test that checks the presence of the declare mapper in the module file?
https://github.com/llvm/llvm-project/pull/163860
More information about the flang-commits
mailing list