[flang-commits] [flang] [flang][acc][lowering] Declare undeclared acc routine bind(name) targets (PR #203088)
via flang-commits
flang-commits at lists.llvm.org
Thu Jun 11 01:05:00 PDT 2026
================
@@ -477,6 +477,14 @@ mlir::func::FuncOp
getOrDeclareFunction(const Fortran::evaluate::ProcedureDesignator &,
Fortran::lower::AbstractConverter &);
+/// Declare or find the mlir::func::FuncOp for an external procedure named
+/// verbatim by \p name (not mangled). Declare it with \p type, or () -> () when
+/// \p type is null.
+mlir::func::FuncOp
+getOrDeclareNamedFunction(llvm::StringRef name,
+ Fortran::lower::AbstractConverter &,
+ mlir::FunctionType type = {});
+
----------------
jeanPerier wrote:
I am pondering if this should be a generic API. The thing that bothers me is that it can look like you could use it as an alternative to `getOrDeclareFunction` to force the name just by using `translateSignature` to get the functionType, but this is not equivalent because `getOrDeclareFunction` will add function and argument attributes that may matter from an ABI point of view.
https://github.com/llvm/llvm-project/pull/203088
More information about the flang-commits
mailing list