FunctionType *FunctionType::get
的一个定义是:
FunctionType *FunctionType::get(Type *Result, bool isVarArg)
创建不带参数的
FunctionType
。
[我们什么时候将使用bool isVarArg
参数来指示参数的类型是可变的,如果类型没有参数?
ArrayRef<Type *> llvm::FunctionType::params () const
中的参数)是文档“无参数”的意思,因此varargs被豁免。 如果您查看ArrayRef<Type *> llvm::FunctionType::params () const
的注释,它说:
返回此函数类型所需的固定参数的数量。这不考虑varargs。