Struct llhd::function::Function
[−]
[src]
pub struct Function { /* fields omitted */ }
A function. Sequentially executes instructions to determine a result value from its inputs. Implements control flow and immediate execution.
Methods
impl Function
[src]
fn new(name: String, ty: Type) -> Function
[src]
Create a new function with the given name and type signature. Anonymous
arguments are created for each argument in the type signature. Use the
args_mut
function to get a hold of these arguments and assign names
and additional data to them.
fn as_ref(&self) -> FunctionRef
[src]
Obtain a reference to this function.
fn name(&self) -> &str
[src]
Get the name of the function.
fn return_ty(&self) -> &Type
[src]
Get the return type of the function.
fn arg(&self, idx: usize) -> ArgumentRef
[src]
Get a graph reference to one of the arguments of the function.
fn args(&self) -> &[Argument]
[src]
Get a reference to the arguments of the function.
fn args_mut(&mut self) -> &mut [Argument]
[src]
Get a mutable reference to the arguments of the function.
fn body(&self) -> &SeqBody
[src]
Get a reference to the sequential body of the function.
fn body_mut(&mut self) -> &mut SeqBody
[src]
Get a mutable reference to the sequential body of the function.
Trait Implementations
impl Value for Function
[src]
fn id(&self) -> ValueId
[src]
Get the unique ID of the value.
fn ty(&self) -> Type
[src]
Get the type of the value.
fn name(&self) -> Option<&str>
[src]
Get the optional name of the value.
fn is_global(&self) -> bool
[src]
Whether this value is global or not. Global values are considered during linking, and are visible in a module's symbol table. Local values are not, and are only visible within the surrounding context (module or unit). Read more