[−][src]Struct llhd::Function
A function. Sequentially executes instructions to determine a result value from its inputs. Implements control flow and immediate execution.
Methods
impl Function
[src]
pub fn new(
name: impl Into<String>,
ty: Type
) -> Function
[src]
name: impl Into<String>,
ty: Type
) -> Function
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.
pub fn as_ref(&self) -> FunctionRef
[src]
Obtain a reference to this function.
pub fn name(&self) -> &str
[src]
Get the name of the function.
pub fn return_ty(&self) -> &Type
[src]
Get the return type of the function.
pub fn arg(&self, idx: usize) -> ArgumentRef
[src]
Get a graph reference to one of the arguments of the function.
pub fn args(&self) -> &[Argument]
[src]
Get a reference to the arguments of the function.
pub fn args_mut(&mut self) -> &mut [Argument]
[src]
Get a mutable reference to the arguments of the function.
pub fn body(&self) -> &SeqBody
[src]
Get a reference to the sequential body of the function.
pub fn body_mut(&mut self) -> &mut SeqBody
[src]
Get a mutable reference to the sequential body of the function.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,