[][src]Struct llir::values::Block

pub struct Block<'ctx>(_, _);

A block inside of function

Implementations

impl<'ctx> Block<'ctx>[src]

pub fn parent_function(&self) -> Function<'ctx>[src]

Get the function containing this block

pub fn iter_instructions(&self) -> BlockInstructionIterator<'ctx>[src]

Iterate the instructions inside this block

for instr in blk.iter_instructions() {
  // Do things to instr...
}

pub fn first_instruction(&self) -> Option<Instruction<'ctx>>[src]

Get the first instruction inside this block

pub fn last_instruction(&self) -> Option<Instruction<'ctx>>[src]

Get the last instruction inside this block

pub fn name(&self) -> String[src]

Get the name of the block

pub fn destination_blocks(&self) -> Vec<Block<'ctx>>[src]

Get the destination blocks that can be reached

pub fn is_loop_entry_block(&self) -> bool[src]

Checking if a block is a loop entry block

Will iterate through all blocks inside the function and see if there is an loop based unconditional branch going to this block. This function is relying on the debug symbol llvm.loop

Trait Implementations

impl<'ctx> Clone for Block<'ctx>[src]

impl<'ctx> Copy for Block<'ctx>[src]

impl<'ctx> Debug for Block<'ctx>[src]

impl<'ctx> Eq for Block<'ctx>[src]

impl<'ctx> GetDebugMetadata<'ctx> for Block<'ctx>[src]

impl<'ctx> Hash for Block<'ctx>[src]

impl<'ctx> PartialEq<Block<'ctx>> for Block<'ctx>[src]

impl<'ctx> Send for Block<'ctx>[src]

impl<'ctx> StructuralEq for Block<'ctx>[src]

impl<'ctx> StructuralPartialEq for Block<'ctx>[src]

impl<'ctx> Sync for Block<'ctx>[src]

Auto Trait Implementations

impl<'ctx> RefUnwindSafe for Block<'ctx>

impl<'ctx> Unpin for Block<'ctx>

impl<'ctx> UnwindSafe for Block<'ctx>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.