LLVM 22.0.0git
Collaboration diagram for Function Types:

Functions

LLVM_C_ABI LLVMTypeRef LLVMFunctionType (LLVMTypeRef ReturnType, LLVMTypeRef *ParamTypes, unsigned ParamCount, LLVMBool IsVarArg)
 Obtain a function type consisting of a specified signature.
LLVM_C_ABI LLVMBool LLVMIsFunctionVarArg (LLVMTypeRef FunctionTy)
 Returns whether a function type is variadic.
LLVM_C_ABI LLVMTypeRef LLVMGetReturnType (LLVMTypeRef FunctionTy)
 Obtain the Type this function Type returns.
LLVM_C_ABI unsigned LLVMCountParamTypes (LLVMTypeRef FunctionTy)
 Obtain the number of parameters this function accepts.
LLVM_C_ABI void LLVMGetParamTypes (LLVMTypeRef FunctionTy, LLVMTypeRef *Dest)
 Obtain the types of a function's parameters.

Detailed Description

Function Documentation

◆ LLVMCountParamTypes()

LLVM_C_ABI unsigned LLVMCountParamTypes ( LLVMTypeRef FunctionTy)

Obtain the number of parameters this function accepts.

Definition at line 778 of file Core.cpp.

References llvm::unwrap().

◆ LLVMFunctionType()

LLVM_C_ABI LLVMTypeRef LLVMFunctionType ( LLVMTypeRef ReturnType,
LLVMTypeRef * ParamTypes,
unsigned ParamCount,
LLVMBool IsVarArg )

Obtain a function type consisting of a specified signature.

The function is defined as a tuple of a return Type, a list of parameter types, and whether the function is variadic.

Definition at line 763 of file Core.cpp.

References llvm::FunctionType::get(), llvm::unwrap(), and llvm::wrap().

◆ LLVMGetParamTypes()

LLVM_C_ABI void LLVMGetParamTypes ( LLVMTypeRef FunctionTy,
LLVMTypeRef * Dest )

Obtain the types of a function's parameters.

The Dest parameter should point to a pre-allocated array of LLVMTypeRef at least LLVMCountParamTypes() large. On return, the first LLVMCountParamTypes() entries in the array will be populated with LLVMTypeRef instances.

Parameters
FunctionTyThe function type to operate on.
DestMemory address of an array to be filled with result.

Definition at line 782 of file Core.cpp.

References T, llvm::unwrap(), and llvm::wrap().

◆ LLVMGetReturnType()

LLVM_C_ABI LLVMTypeRef LLVMGetReturnType ( LLVMTypeRef FunctionTy)

Obtain the Type this function Type returns.

Definition at line 774 of file Core.cpp.

References llvm::unwrap(), and llvm::wrap().

◆ LLVMIsFunctionVarArg()

LLVM_C_ABI LLVMBool LLVMIsFunctionVarArg ( LLVMTypeRef FunctionTy)

Returns whether a function type is variadic.

Definition at line 770 of file Core.cpp.

References llvm::unwrap().