LLVM 24.0.0git
llvm::abi::RequiredArgs Class Reference

Whether a signature accepts arguments beyond its declared parameters, and where the declared ones end when it does. More...

#include "llvm/ABI/FunctionInfo.h"

Public Types

enum  All_t { All }

Public Member Functions

 RequiredArgs (All_t)
 A signature with no ellipsis, where every argument is declared.
 RequiredArgs (unsigned N)
 A signature whose leading N arguments are declared and whose remaining arguments pass through an ellipsis.
bool allowsOptionalArgs () const
unsigned getNumRequiredArgs () const

Detailed Description

Whether a signature accepts arguments beyond its declared parameters, and where the declared ones end when it does.

An argument past an ellipsis is unnamed, and some ABI rules pass an unnamed type differently.

A count and All are not interchangeable when the count equals the number of arguments. FunctionInfo::isVariadic() is true whenever a count was given, so a signature with no ellipsis has to be spelled All.

Definition at line 217 of file FunctionInfo.h.

Member Enumeration Documentation

◆ All_t

Enumerator
All 

Definition at line 223 of file FunctionInfo.h.

Constructor & Destructor Documentation

◆ RequiredArgs() [1/2]

llvm::abi::RequiredArgs::RequiredArgs ( All_t )
inline

A signature with no ellipsis, where every argument is declared.

Definition at line 226 of file FunctionInfo.h.

◆ RequiredArgs() [2/2]

llvm::abi::RequiredArgs::RequiredArgs ( unsigned N)
inlineexplicit

A signature whose leading N arguments are declared and whose remaining arguments pass through an ellipsis.

Definition at line 230 of file FunctionInfo.h.

References assert(), and N.

Member Function Documentation

◆ allowsOptionalArgs()

bool llvm::abi::RequiredArgs::allowsOptionalArgs ( ) const
inline

Definition at line 234 of file FunctionInfo.h.

Referenced by getNumRequiredArgs().

◆ getNumRequiredArgs()

unsigned llvm::abi::RequiredArgs::getNumRequiredArgs ( ) const
inline

Definition at line 236 of file FunctionInfo.h.

References allowsOptionalArgs(), and assert().


The documentation for this class was generated from the following file: