[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
Wed Oct 29 07:27:09 PDT 2025


================
@@ -447,6 +447,13 @@ class FirConverter : public Fortran::lower::AbstractConverter {
       }
     });
 
+    // Ensure imported OpenMP declare mappers are materialized at module
+    // scope before lowering any constructs that may reference them.
+    createBuilderOutsideOfFuncOpAndDo([&]() {
+      Fortran::lower::materializeOpenMPDeclareMappers(
+          *this, bridge.getSemanticsContext());
+    });
+
----------------
TIFitis wrote:

I think we can't move this above for the same reason stated above.

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


More information about the flang-commits mailing list