efriedma-quic wrote: The argument forwarding functionality for musttail is very specifically designed for varargs arguments. The LangRef definition doesn't promise to preserve any registers other than the registers required for a varargs call, and the backend does not try to preserve those registers. In many cases, non-varargs calls use other registers. Those registers are usually not integer registers, so you might get lucky in most cases, but it's not something we currently model.
-------- Parameter types have to be complete on the actual definition, and you can't take the address of a function unless it's defined somewhere. And argument types have to be complete to call a function. I guess the issue here is that we try to emit the thunk in some other translation unit, which contains neither the definition nor a call. We could just emit the thunk alongside the definition, but I guess that's inefficient because it's rare to take the address of a virtual function? Is there any reason you'd want to use the thunk for a direct call to a virtual function? https://github.com/llvm/llvm-project/pull/243314 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
