[−][src]Struct souper_ir::ast::LeftHandSideBuilder
A builder for a LeftHandSide
.
Implementations
impl LeftHandSideBuilder
[src]
pub fn assignment(
&mut self,
name: Option<String>,
r#type: Option<Type>,
value: impl Into<AssignmentRhs>,
attributes: Vec<Attribute>
) -> ValueId
[src]
&mut self,
name: Option<String>,
r#type: Option<Type>,
value: impl Into<AssignmentRhs>,
attributes: Vec<Attribute>
) -> ValueId
Create a new assignment statement.
Returns the value defined by the assignment.
Panics
Panics if name
(when given) does not start with '%'.
pub fn block(&mut self, name: Option<String>, predecessors: u32) -> BlockId
[src]
Create a new basic block.
Declare that the block has predecessors
number of incoming edges in
the control-flow graph.
Panics
Panics if name
(when given) does not start with '%'.
pub fn pc(&mut self, x: impl Into<Operand>, y: impl Into<Operand>)
[src]
Create a path condition.
Expresses the fact that x
must equal y
for the replacement to be
valid.
pub fn block_pc(
&mut self,
block: BlockId,
predecessor: u32,
x: impl Into<Operand>,
y: impl Into<Operand>
)
[src]
&mut self,
block: BlockId,
predecessor: u32,
x: impl Into<Operand>,
y: impl Into<Operand>
)
Create a block path condition.
Expresses that x
is equal to y
on an incoming edge to block
in the
control-flow graph.
Panics
Panics if predecessor
is greater than or equal to block
's number of
predecessors.
pub fn finish(
self,
lhs: ValueId,
attributes: impl IntoIterator<Item = RootAttribute>
) -> LeftHandSide
[src]
self,
lhs: ValueId,
attributes: impl IntoIterator<Item = RootAttribute>
) -> LeftHandSide
Finish building this LeftHandSide
.
pub fn get_value(&self, id: ValueId) -> &Assignment
[src]
Get the assignment that created the given value.
Panics
May panic when given a ValudId
from a different LHS, RHS, or
replacement.
Trait Implementations
impl Clone for LeftHandSideBuilder
[src]
fn clone(&self) -> LeftHandSideBuilder
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for LeftHandSideBuilder
[src]
impl Default for LeftHandSideBuilder
[src]
fn default() -> LeftHandSideBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for LeftHandSideBuilder
impl Send for LeftHandSideBuilder
impl Sync for LeftHandSideBuilder
impl Unpin for LeftHandSideBuilder
impl UnwindSafe for LeftHandSideBuilder
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,
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.
fn to_owned(&self) -> T
[src]
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.
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>,