- Fix a bug in PrettyBuiltinDumper that returns "void" as the name for an unspecified builtin type. Since the unspecified param of a variadic function is considered a builtin of unspecified type in PDBs, we set "..." for its name.
- Provide a method to determine if a PDBSymbolFunc is variadic in PrettyFunctionDumper since PDBSymbolFunc::getArgument() doesn't return the last unspecified-type param.
- Add a pretty-func-dumper.test to test pretty dumping of variadic functions.
Thanks for finding this and adding a test. Only one comment, but after that this will be good.
|193–194 ↗||(On Diff #128841)|
This check is pretty unintuitive. Is it possible to implement just by looking at the last argument and checking if it's a builtin with type unspecified? Something like
auto Last = SigArguments->getLast(); if (Last->getType() == PDB_Type::Builtin && Last->getBuiltinType() == PDB_BuiltinType::None)
? Either way, to make sure nobody else has to rediscover this, it would be nice if whatever check we do decide on can be put into a function in PDBFunctionType and PDBFunctionSigType, so that we can just say if (Signature->isCVarArgs()) or if (Func->isCVarArgs())?