================
@@ -321,17 +321,38 @@ convertABIArgInfo(const llvm::abi::ArgInfo &info, 
MLIRContext *ctx,
   return ArgClassification::getIgnore();
 }
 
+/// The number of leading arguments the classifier must treat as declared
+/// parameters, which is meaningful only for a variadic signature: an argument
+/// past the ellipsis is unnamed, and the x86_64 rules pass some unnamed types
+/// differently.  std::nullopt for a non-variadic signature, where every
----------------
andykaylor wrote:

That seems like a problem waiting to happen, as future developers may make the 
same bad assumption I did. I see that in `CGFunctionInfo` (and 
`CIRGenFunctionInfo`) this is implemented as `bool isVariadic() const { return 
Required.allowsOptionalArgs(); }` where `Required` is a wrapper class that uses 
`NumRequired == ~0u` to indicate that there are no optional arguments. I don't 
love that implementation either, but it is at least explicit about what the 
special case means.

My concern is that it's the optional arguments that might not exist here, not 
the required arguments.

https://github.com/llvm/llvm-project/pull/213315
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to