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
Region *getCallableRegion() { return &getBody(); }
/// Returns the callable result type, which is the function return type.
- ArrayRef<Type> getCallableResults() { return getFunctionType().getReturnType(); }
+ ArrayRef<Type> getCallableResults() { return getFunctionType().getReturnTypes(); }
}];