[][src]Struct llhd::Block

pub struct Block { /* fields omitted */ }

A basic block.

Methods

impl Block
[src]

pub fn new(name: Option<String>) -> Block
[src]

Create a new empty basic block with an optional name (aka label).

pub fn as_ref(&self) -> BlockRef
[src]

Obtain a reference to this block.

Important traits for InstIter<'tf>
pub fn insts<'a>(&'a self, ctx: &'a dyn UnitContext) -> InstIter<'a>
[src]

Obtain an iterator over the instructions in this block.

pub fn inst_refs(&self) -> Iter<InstRef>
[src]

Obtain an iterator over references to the instructions in this block.

pub fn insert_inst(&mut self, inst: InstRef, pos: InstPosition)
[src]

Insert an instruction into this block as dictated by the requested position. Begin and End are treated as synonyms to BlockBegin and BlockEnd. Panics if the referred instruction is not part of this block.

pub fn detach_inst(&mut self, inst: InstRef)
[src]

Detach an instruction from this block. Panics if the instruction is not part of this block.

Trait Implementations

impl Value for Block
[src]

Auto Trait Implementations

impl Send for Block

impl Sync for Block

Blanket Implementations

impl<T> From for T
[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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