[MLIR][LLVM] Don't use void return type in `getCallableResults`.
authorJohannes de Fine Licht <johannes.definelicht@nextsilicon.com>
Thu, 19 Jan 2023 08:52:08 +0000 (09:52 +0100)
committerTobias Gysi <tobias.gysi@nextsilicon.com>
Thu, 19 Jan 2023 09:01:22 +0000 (10:01 +0100)
commitd49d83e79ca0b59c3d68ff6c46eea69d848b0617
tree9bde0ba70673e6270ec53297b4f3473401df8968
parent6c8a884707e573eec66bb8e512aeaec5aeb8ab8e
[MLIR][LLVM] Don't use void return type in `getCallableResults`.

In the LLVM IR dialect, `LLVMVoidType` is used to model the return type
of LLVM IR functions with no return value. This is inconsistent with
MLIR APIs, which expect a function with no return value to have an
empty return type. Handle this special case in `LLVMFuncOp` to avoid
mismatches between the number of return values and return types between
caller and callee.

Reviewed By: ftynse

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