Functions
LLVM.Function — Type
LLVM.FunctionA function in the IR.
LLVM.Function — Method
LLVM.Function(mod::Module, name::String, ft::FunctionType)Create a new function in the given module with the given name and function type.
Properties and operations
LLVM.function_type — Function
function_type(f::Function) -> LLVM.FunctionTypeGet the function type of the given function. This returns a function type, as opposed to value_type which returns the pointer type of the function constant.
Base.empty! — Function
empty!(f::Function)Delete the body of the given function, and convert the linkage to external.
LLVM.erase! — Method
erase!(f::Function)Remove the given function from its parent module and free the object.
LLVM.personality — Function
personality(f::Function)Get the personality function of the given function, or nothing if it has none.
LLVM.personality! — Function
personality!(f::Function, persfn::Function)Set the personality function of the given function. Pass nothing to remove the personality function.
LLVM.callconv — Function
callconv(f::Function)Get the calling convention of the given function.
callconv(call_inst::Instruction)Get the calling convention of the given callable instruction.
LLVM.callconv! — Function
callconv!(f::Function, cc)Set the calling convention of the given function.
callconv!(call_inst::Instruction, cc)Set the calling convention of the given callable instruction.
LLVM.entry — Function
entry(f::Function) -> BasicBlockGet the entry basic block of the given function.
Attributes
LLVM.function_attributes — Method
function_attributes(f::Function)Get the attributes of the given function.
This is a mutable iterator, supporting push!, append! and delete!.
LLVM.parameter_attributes — Method
parameter_attributes(f::Function, idx::Integer)Get the attributes of the given parameter of the given function.
This is a mutable iterator, supporting push!, append! and delete!.
LLVM.return_attributes — Method
return_attributes(f::Function)Get the attributes of the return value of the given function.
This is a mutable iterator, supporting push!, append! and delete!.
Parameters
LLVM.parameters — Function
parameters(ft::LLVM.FunctionType)Get the parameter types of the given function type.
parameters(f::Function)Get an iterator over the parameters of the given function. These are values that can be used as inputs to other instructions.
Basic Blocks
LLVM.blocks — Function
blocks(f::Function)Get an iterator over the basic blocks of the given function.
LLVM.prevblock — Function
prevblock(bb::BasicBlock)Get the previous basic block of the given basic block, or nothing if there is none.
LLVM.nextblock — Function
nextblock(bb::BasicBlock)Get the next basic block of the given basic block, or nothing if there is none.
Intrinsics
LLVM.isintrinsic — Function
isintrinsic(f::Function)Check if the given function is an intrinsic.
LLVM.isoverloaded — Function
isoverloaded(intr::Intrinsic)Check if the given intrinsic is overloaded.
LLVM.Function — Method
Function(mod::Module, intr::Intrinsic, params::Vector{<:LLVMType}=LLVMType[])Get the declaration of the given intrinsic in the given module.
LLVM.FunctionType — Method
FunctionType(intr::Intrinsic, params::Vector{<:LLVMType}=LLVMType[])Get the function type of the given intrinsic with the given parameter types.