pub struct CfgBuilder { /* private fields */ }Expand description
Builder for constructing CFGs
Implementations§
Source§impl CfgBuilder
impl CfgBuilder
pub fn new() -> Self
Sourcepub fn add_instruction(&mut self)
pub fn add_instruction(&mut self)
Add an instruction to the current block
Sourcepub fn start_block(&mut self) -> BlockId
pub fn start_block(&mut self) -> BlockId
Start a new basic block
Sourcepub fn add_branch(&mut self, target: BlockId)
pub fn add_branch(&mut self, target: BlockId)
Add a branch from current block to target block
Sourcepub fn set_current_block(&mut self, block_id: BlockId)
pub fn set_current_block(&mut self, block_id: BlockId)
Set the current block (for test purposes)
Sourcepub fn terminate_block(&mut self)
pub fn terminate_block(&mut self)
Mark current block as ending with a terminator
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CfgBuilder
impl RefUnwindSafe for CfgBuilder
impl Send for CfgBuilder
impl Sync for CfgBuilder
impl Unpin for CfgBuilder
impl UnsafeUnpin for CfgBuilder
impl UnwindSafe for CfgBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more