[−][src]Struct llir::values::Function
Implementations
impl<'ctx> Function<'ctx>
[src]
pub fn name(&self) -> String
[src]
Get the name of the function
pub fn is_declaration_only(&self) -> bool
[src]
Check if this function is declaration only
pub fn iter_blocks(&self) -> FunctionBlockIterator<'ctx>
[src]
Iterate blocks inside of this function
for blk in func.iter_blocks() { // Do things to blk... }
pub fn iter_instructions(&self) -> FunctionInstructionIterator<'ctx>
[src]
Iterate all the instructions of this function; will iterate the blocks and then the instructions in each block
for instr in func.iter_instructions() { // Do things with instr... }
is exactly the same as
for blk in func.iter_blocks() { for instr in blk.iter_instructions() { // Do things with instr... } }
pub fn num_blocks(&self) -> usize
[src]
Get the number of blocks inside the function
pub fn first_block(&self) -> Option<Block<'ctx>>
[src]
Get the first block of this function
pub fn last_block(&self) -> Option<Block<'ctx>>
[src]
Get the last block of this function
pub fn is_var_arg(&self) -> bool
[src]
Check if the function is variable arguments
pub fn num_arguments(&self) -> usize
[src]
Get the number of arguments in this function
pub fn arguments(&self) -> Vec<Argument<'ctx>>
[src]
Get the arguments to this function in vector form
pub fn argument(&self, index: usize) -> Argument<'ctx>
[src]
Get the argument at a given index
pub fn get_function_type(&self) -> FunctionType<'ctx>
[src]
Get the function type
Trait Implementations
impl<'ctx> AsConstant<'ctx> for Function<'ctx>
[src]
fn as_constant(&self) -> Constant<'ctx>
[src]
impl<'ctx> AsOperand<'ctx> for Function<'ctx>
[src]
fn as_operand(&self) -> Operand<'ctx>
[src]
impl<'ctx> Clone for Function<'ctx>
[src]
impl<'ctx> Copy for Function<'ctx>
[src]
impl<'ctx> Debug for Function<'ctx>
[src]
impl<'ctx> Eq for Function<'ctx>
[src]
impl<'ctx> GetDebugLoc for Function<'ctx>
[src]
fn filename(&self) -> Option<String>
[src]
fn line(&self) -> Option<u32>
[src]
fn col(&self) -> Option<u32>
[src]
fn debug_loc_string(&self) -> String
[src]
impl<'ctx> GetDebugMetadata<'ctx> for Function<'ctx>
[src]
fn dbg_metadata(&self) -> Option<Metadata<'ctx>>
[src]
impl<'ctx> GetType<'ctx> for Function<'ctx>
[src]
impl<'ctx> Hash for Function<'ctx>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'ctx> PartialEq<Function<'ctx>> for Function<'ctx>
[src]
impl<'ctx> Send for Function<'ctx>
[src]
impl<'ctx> StructuralEq for Function<'ctx>
[src]
impl<'ctx> StructuralPartialEq for Function<'ctx>
[src]
impl<'ctx> Sync for Function<'ctx>
[src]
Auto Trait Implementations
impl<'ctx> RefUnwindSafe for Function<'ctx>
impl<'ctx> Unpin for Function<'ctx>
impl<'ctx> UnwindSafe for Function<'ctx>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,