[clang] [flang] [flang][OpenMP] Globalize MAIN scalars used in parallel regions (PR #236384)

Sergey Shcherbinin via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 29 06:25:27 PDT 2026


================
@@ -35,10 +41,14 @@ class HostAssociations {
   bool hasTupleAssociations() const { return !tupleSymbols.empty(); }
 
   /// Adds a set of Symbols that will be the host associated bindings for this
-  /// host procedure.
+  /// host procedure. getVariables is invoked synchronously only for newly
+  /// promoted globals and must return Program's finalized, stable records.
   void addSymbolsToBind(
       const llvm::SetVector<const Fortran::semantics::Symbol *> &symbols,
-      const Fortran::semantics::Scope &hostScope);
+      const Fortran::semantics::Scope &hostScope,
+      llvm::function_ref<const std::vector<pft::Variable> &()> getVariables);
+
+  const std::vector<pft::Variable> *getVariables() const { return variables; }
----------------
SergeyShch01 wrote:

Ok, done

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


More information about the cfe-commits mailing list