================
@@ -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
----------------
adams381 wrote:

The return value is `FunctionInfo::create`'s `NumRequired` parameter, read back 
by two accessors in `llvm/ABI/FunctionInfo.h`, outside this pass:

```c++
bool isVariadic() const { return NumRequired.has_value(); }

unsigned getNumRequiredArgs() const {
  return isVariadic() ? *NumRequired : arg_size();
}
```

The reason is `isVariadic()`, which would answer true for every function.

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