[flang-commits] [flang] [Flang] Add partial support for lowering procedure pointer assignment. (PR #70461)
via flang-commits
flang-commits at lists.llvm.org
Mon Nov 13 10:53:31 PST 2023
================
@@ -125,3 +130,15 @@ hlfir::EntityWithAttributes Fortran::lower::convertProcedureDesignatorToHLFIR(
[funcAddr](const auto &) { return funcAddr; });
return hlfir::EntityWithAttributes{res};
}
+
+mlir::Value Fortran::lower::convertProcedureDesignatorToAddress(
+ Fortran::lower::AbstractConverter &converter, mlir::Location loc,
+ mlir::Type boxType, Fortran::lower::StatementContext &stmtCtx,
+ const Fortran::semantics::Symbol *sym) {
+ Fortran::lower::SymMap globalOpSymMap;
+ Fortran::evaluate::ProcedureDesignator proc(*sym);
+ auto procVal{Fortran::lower::convertProcedureDesignatorToHLFIR(
+ loc, converter, proc, globalOpSymMap, stmtCtx)};
+ return fir::getBase(Fortran::lower::convertToAddress(
+ loc, converter, procVal, stmtCtx, procVal.getType()));
----------------
jeanPerier wrote:
But it is also OK to do the convert inside just before the HasValueOp if needed instead of passing boxType as an argument and doing that here.
https://github.com/llvm/llvm-project/pull/70461
More information about the flang-commits
mailing list