LLVM 22.0.0git
|
Functions in this group relate to arguments/parameters on functions. More...
Functions | |
LLVM_C_ABI unsigned | LLVMCountParams (LLVMValueRef Fn) |
Obtain the number of parameters in a function. | |
LLVM_C_ABI void | LLVMGetParams (LLVMValueRef Fn, LLVMValueRef *Params) |
Obtain the parameters in a function. | |
LLVM_C_ABI LLVMValueRef | LLVMGetParam (LLVMValueRef Fn, unsigned Index) |
Obtain the parameter at the specified index. | |
LLVM_C_ABI LLVMValueRef | LLVMGetParamParent (LLVMValueRef Inst) |
Obtain the function to which this argument belongs. | |
LLVM_C_ABI LLVMValueRef | LLVMGetFirstParam (LLVMValueRef Fn) |
Obtain the first parameter to a function. | |
LLVM_C_ABI LLVMValueRef | LLVMGetLastParam (LLVMValueRef Fn) |
Obtain the last parameter to a function. | |
LLVM_C_ABI LLVMValueRef | LLVMGetNextParam (LLVMValueRef Arg) |
Obtain the next parameter to a function. | |
LLVM_C_ABI LLVMValueRef | LLVMGetPreviousParam (LLVMValueRef Arg) |
Obtain the previous parameter to a function. | |
LLVM_C_ABI void | LLVMSetParamAlignment (LLVMValueRef Arg, unsigned Align) |
Set the alignment for a function parameter. |
Functions in this group relate to arguments/parameters on functions.
Functions in this group expect LLVMValueRef instances that correspond to llvm::Function instances.
LLVM_C_ABI unsigned LLVMCountParams | ( | LLVMValueRef | Fn | ) |
Obtain the number of parameters in a function.
Definition at line 2630 of file Core.cpp.
References llvm::unwrap().
LLVM_C_ABI LLVMValueRef LLVMGetFirstParam | ( | LLVMValueRef | Fn | ) |
Obtain the first parameter to a function.
Definition at line 2651 of file Core.cpp.
References I, llvm::unwrap(), and llvm::wrap().
LLVM_C_ABI LLVMValueRef LLVMGetLastParam | ( | LLVMValueRef | Fn | ) |
Obtain the last parameter to a function.
Definition at line 2659 of file Core.cpp.
References I, llvm::unwrap(), and llvm::wrap().
LLVM_C_ABI LLVMValueRef LLVMGetNextParam | ( | LLVMValueRef | Arg | ) |
Obtain the next parameter to a function.
This takes an LLVMValueRef obtained from LLVMGetFirstParam() (which is actually a wrapped iterator) and obtains the next parameter from the underlying iterator.
Definition at line 2667 of file Core.cpp.
References A(), llvm::Function::arg_begin(), llvm::Function::arg_size(), llvm::unwrap(), and llvm::wrap().
LLVM_C_ABI LLVMValueRef LLVMGetParam | ( | LLVMValueRef | Fn, |
unsigned | Index ) |
Obtain the parameter at the specified index.
Parameters are indexed from 0.
Definition at line 2642 of file Core.cpp.
References llvm::Function::arg_begin(), llvm::unwrap(), and llvm::wrap().
LLVM_C_ABI LLVMValueRef LLVMGetParamParent | ( | LLVMValueRef | Inst | ) |
Obtain the function to which this argument belongs.
Unlike other functions in this group, this one takes an LLVMValueRef that corresponds to a llvm::Attribute.
The returned LLVMValueRef is the llvm::Function to which this argument belongs.
Definition at line 2647 of file Core.cpp.
References getParent(), llvm::unwrap(), and llvm::wrap().
LLVM_C_ABI void LLVMGetParams | ( | LLVMValueRef | Fn, |
LLVMValueRef * | Params ) |
Obtain the parameters in a function.
The takes a pointer to a pre-allocated array of LLVMValueRef that is at least LLVMCountParams() long. This array will be filled with LLVMValueRef instances which correspond to the parameters the function receives. Each LLVMValueRef corresponds to a llvm::Argument instance.
Definition at line 2636 of file Core.cpp.
References A(), llvm::Function::args(), llvm::unwrap(), and llvm::wrap().
LLVM_C_ABI LLVMValueRef LLVMGetPreviousParam | ( | LLVMValueRef | Arg | ) |
Obtain the previous parameter to a function.
This is the opposite of LLVMGetNextParam().
Definition at line 2675 of file Core.cpp.
References A(), llvm::unwrap(), and llvm::wrap().
LLVM_C_ABI void LLVMSetParamAlignment | ( | LLVMValueRef | Arg, |
unsigned | Align ) |
Set the alignment for a function parameter.
Definition at line 2682 of file Core.cpp.
References A(), llvm::Attribute::getWithAlignment(), and llvm::unwrap().