[flang-commits] [flang] [Flang] Add partial support for lowering procedure pointer assignment. (PR #70461)
Daniel Chen via flang-commits
flang-commits at lists.llvm.org
Mon Nov 13 10:33:22 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()));
----------------
DanielCChen wrote:
Actually, the `boxType` is NOT being used. The type is solely based on the procedure target `sym`.
I will remove the `boxType`.
https://github.com/llvm/llvm-project/pull/70461
More information about the flang-commits
mailing list