diff options
Diffstat (limited to 'flang/lib/Lower/CallInterface.cpp')
| -rw-r--r-- | flang/lib/Lower/CallInterface.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/flang/lib/Lower/CallInterface.cpp b/flang/lib/Lower/CallInterface.cpp index 72431a9cfacc..c3284cd936f8 100644 --- a/flang/lib/Lower/CallInterface.cpp +++ b/flang/lib/Lower/CallInterface.cpp @@ -1766,6 +1766,17 @@ mlir::Type Fortran::lower::getDummyProcedureType( return procType; } +mlir::Type Fortran::lower::getDummyProcedurePointerType( + const Fortran::semantics::Symbol &dummyProcPtr, + Fortran::lower::AbstractConverter &converter) { + std::optional<Fortran::evaluate::characteristics::Procedure> iface = + Fortran::evaluate::characteristics::Procedure::Characterize( + dummyProcPtr, converter.getFoldingContext()); + mlir::Type procPtrType = getProcedureDesignatorType( + iface.has_value() ? &*iface : nullptr, converter); + return fir::ReferenceType::get(procPtrType); +} + bool Fortran::lower::isCPtrArgByValueType(mlir::Type ty) { return mlir::isa<fir::ReferenceType>(ty) && fir::isa_integer(fir::unwrapRefType(ty)); |
