[Mlir-commits] [mlir] [MLIR] Fix import of invokes with mismatched variadic types (PR #124828)

Tobias Gysi llvmlistbot at llvm.org
Tue Jan 28 23:48:24 PST 2025


================
@@ -2097,6 +2085,43 @@ void ModuleImport::convertParameterAttributes(llvm::Function *func,
       builder.getArrayAttr(convertParameterAttribute(llvmResAttr, builder)));
 }
 
+namespace impl {
+template <typename Op>
+LogicalResult convertCallBaseAttributes(llvm::CallBase *inst, Op op) {
+  op.setCConv(convertCConvFromLLVM(inst->getCallingConv()));
+  return success();
+}
+} // namespace impl
----------------
gysit wrote:

```suggestion
template <typename Op>
static LogicalResult convertCallBaseAttributes(llvm::CallBase *inst, Op op) {
  op.setCConv(convertCConvFromLLVM(inst->getCallingConv()));
  return success();
}
```
nit: AFAIK the preferred way for such helper templates in cpps is to use static template functions. Or did this not work for some reason?

https://github.com/llvm/llvm-project/pull/124828


More information about the Mlir-commits mailing list