================ @@ -700,10 +700,13 @@ class MSBuiltin<string name> { //===--------------- Variable Argument Handling Intrinsics ----------------===// // -def int_vastart : DefaultAttrsIntrinsic<[], [llvm_ptr_ty], [], "llvm.va_start">; -def int_vacopy : DefaultAttrsIntrinsic<[], [llvm_ptr_ty, llvm_ptr_ty], [], - "llvm.va_copy">; -def int_vaend : DefaultAttrsIntrinsic<[], [llvm_ptr_ty], [], "llvm.va_end">; +def int_vastart : DefaultAttrsIntrinsic<[], + [llvm_anyptr_ty], [], "llvm.va_start">; +def int_vacopy : DefaultAttrsIntrinsic<[], + [llvm_anyptr_ty, llvm_anyptr_ty], [], + "llvm.va_copy">; ---------------- AlexVlx wrote:
Hmm, I did struggle a bit with this and admit that I'm not (yet) entirely convinced a valid (albeit hypothetical and admittedly odd) case couldn't be constructed. Consider e.g. having a `__builtin_va_list` declared at namespace / global scope. If a target uses an explicit, non-generic, AS, for globals, then the copy would be to/from a pointer to generic (or pointer to private) from/to a pointer to global. I _believe_ this should work, and making `va_copy` mono-parameter would break it, would it not? https://github.com/llvm/llvm-project/pull/85460 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits