[mlir][llvm] Don't return a dangling reference in getCallableResults().
authorJohannes de Fine Licht <johannes.definelicht@nextsilicon.com>
Tue, 25 Oct 2022 12:52:59 +0000 (15:52 +0300)
committerTobias Gysi <tobias.gysi@nextsilicon.com>
Tue, 25 Oct 2022 13:05:33 +0000 (16:05 +0300)
commit14de3d5c634bfacb24e16ebe14dc3b608fb0be9a
treeee55571266085493af5e2768c6515789fa05b18e
parentc4051b2606182d2cdd0cd0c3c70aa1aa4ce61dff
[mlir][llvm] Don't return a dangling reference in getCallableResults().

Use the `getReturnTypes()` API (which returns an `ArrayRef<Type>`)
rather than the `getReturnType()` API (which returns a `Type`) to avoid
returning a dangling reference in `LLVMFuncOp::getCallableResults()`.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D136669
mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td