[flang-commits] [flang] [flang] Do not produce result for void runtime call (PR #123155)
via flang-commits
flang-commits at lists.llvm.org
Thu Jan 16 05:45:02 PST 2025
================
@@ -776,6 +776,9 @@ static mlir::func::FuncOp getRuntimeFunc(mlir::Location loc,
if (func)
return func;
auto funTy = RuntimeEntry::getTypeModel()(builder.getContext());
+ if (funTy.getResults().size() == 1 &&
+ mlir::isa<mlir::NoneType>(funTy.getResult(0)))
+ funTy = mlir::FunctionType::get(funTy.getContext(), funTy.getInputs(), {});
----------------
jeanPerier wrote:
Is it possible to move this handling in [getTypeModel](https://github.com/llvm/llvm-project/blob/3eee79ae71d9ce800c760c652aab5bf90e1d78d1/flang/include/flang/Optimizer/Builder/Runtime/RTBuilder.h#L677) here directly so that any other current/future usage of `getTypeModel` are correct?
https://github.com/llvm/llvm-project/pull/123155
More information about the flang-commits
mailing list