Struct melior::dialect::ods::pdl_interp::CheckTypeOperation
source · pub struct CheckTypeOperation<'c> { /* private fields */ }
Expand description
A check_type
operation. Compare a type to a known value.
pdl_interp.check_type
operations compare a type with a statically known
type. On success, this operation branches to the true destination, otherwise
the false destination is taken.
Example:
pdl_interp.check_type %type is i32 -> ^matchDest, ^failureDest
Implementations§
source§impl<'c> CheckTypeOperation<'c>
impl<'c> CheckTypeOperation<'c>
sourcepub fn as_operation(&self) -> &Operation<'c>
pub fn as_operation(&self) -> &Operation<'c>
Returns a generic operation.
sourcepub fn builder(
context: &'c Context,
location: Location<'c>
) -> CheckTypeOperationBuilder<'c, Unset, Unset, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> CheckTypeOperationBuilder<'c, Unset, Unset, Unset, Unset>
Creates a builder.
pub fn value(&self) -> Result<Value<'c, '_>, Error>
pub fn true_dest(&self) -> Result<BlockRef<'c, '_>, Error>
pub fn false_dest(&self) -> Result<BlockRef<'c, '_>, Error>
pub fn type(&self) -> Result<TypeAttribute<'c>, Error>
pub fn set_type(&mut self, value: TypeAttribute<'c>)
Trait Implementations§
source§impl<'c> From<CheckTypeOperation<'c>> for Operation<'c>
impl<'c> From<CheckTypeOperation<'c>> for Operation<'c>
source§fn from(operation: CheckTypeOperation<'c>) -> Self
fn from(operation: CheckTypeOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for CheckTypeOperation<'c>
impl<'c> !Send for CheckTypeOperation<'c>
impl<'c> !Sync for CheckTypeOperation<'c>
impl<'c> Unpin for CheckTypeOperation<'c>
impl<'c> UnwindSafe for CheckTypeOperation<'c>
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