lucaslive974 wrote: I ran into a concerning issue while solving the CallOp lowering.
The no_proto information is owned by the function declaration (FuncOp), meaning CallOp does not have enough local information to handle lowering on its side. Furthermore, FunctionType currently lacks the context to determine whether a call is no_proto (e.g., checking the number of arguments is not a valid metric because it is only relevant for pre-C23 C code). I am considering a few options and researching the best approach: At the CIR level: Modify FunctionType to be variadic during AST-to-CIR generation if the AST node represents a no_proto function. During lowering: Look up the corresponding FuncOp from the CallOp and rewrite all call sites with an updated variadic type. Type system extension: Add an attribute to cir::FuncType that maps directly to the variadic boolean during the CIR-to-LLVM rewrite. https://github.com/llvm/llvm-project/pull/213478 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
