Struct llhd::block::Block
[−]
[src]
pub struct Block { /* fields omitted */ }
A basic block.
Methods
impl Block
[src]
fn new(name: Option<String>) -> Block
[src]
Create a new empty basic block with an optional name (aka label).
fn as_ref(&self) -> BlockRef
[src]
Obtain a reference to this block.
fn insts<'a>(&'a self, ctx: &'a UnitContext) -> InstIter<'a>
[src]
Obtain an iterator over the instructions in this block.
fn inst_refs(&self) -> Iter<InstRef>
[src]
Obtain an iterator over references to the instructions in this block.
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.
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]
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