When using --convert-func-to-llvm=emit-c-wrappers the attribute arguments of the wrapper would not be created correctly in some cases.
This patch fixes that and introduces a set of tests for (hopefully) all corner cases.
See https://github.com/llvm/llvm-project/issues/53503
Author: Sam Carroll <sam.carroll@lmns.com>
Co-Author: Laszlo Kindrat <laszlo.kindrat@lmns.com>
I would rather put this into the LLVM dialect itself and have a verifier that checks if the attribute is well-formed (used in an op with FunctionOpInterface, the number of elements matches the number of struct elements).