LLVM  mainline
Function Types
Collaboration diagram for Function Types:


LLVMTypeRef LLVMFunctionType (LLVMTypeRef ReturnType, LLVMTypeRef *ParamTypes, unsigned ParamCount, LLVMBool IsVarArg)
LLVMBool LLVMIsFunctionVarArg (LLVMTypeRef FunctionTy)
LLVMTypeRef LLVMGetReturnType (LLVMTypeRef FunctionTy)
unsigned LLVMCountParamTypes (LLVMTypeRef FunctionTy)
void LLVMGetParamTypes (LLVMTypeRef FunctionTy, LLVMTypeRef *Dest)

Function Documentation

Obtain the number of parameters this function accepts.

Definition at line 409 of file Core.cpp.

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 394 of file Core.cpp.

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

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.

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

Definition at line 413 of file Core.cpp.

References I, llvm::FunctionType::param_begin(), llvm::FunctionType::param_end(), and llvm::wrap().

Obtain the Type this function Type returns.

Definition at line 405 of file Core.cpp.

References llvm::wrap().

Returns whether a function type is variadic.

Definition at line 401 of file Core.cpp.