pub struct PoisonOperation<'c> { /* private fields */ }
Expand description
A mlir.poison
operation. Creates a poison value of LLVM dialect type..
Unlike LLVM IR, MLIR does not have first-class poison values. Such values
must be created as SSA values using llvm.mlir.poison
. This operation has
no operands or attributes. It creates a poison value of the specified LLVM
IR dialect type.
Example:
// Create a poison value for a structure with a 32-bit integer followed
// by a float.
%0 = llvm.mlir.poison : !llvm.struct<(i32, f32)>
Implementations§
source§impl<'c> PoisonOperation<'c>
impl<'c> PoisonOperation<'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>
) -> PoisonOperationBuilder<'c, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> PoisonOperationBuilder<'c, Unset>
Creates a builder.
pub fn res(&self) -> Result<OperationResult<'c, '_>, Error>
Trait Implementations§
source§impl<'c> From<PoisonOperation<'c>> for Operation<'c>
impl<'c> From<PoisonOperation<'c>> for Operation<'c>
source§fn from(operation: PoisonOperation<'c>) -> Self
fn from(operation: PoisonOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for PoisonOperation<'c>
impl<'c> !Send for PoisonOperation<'c>
impl<'c> !Sync for PoisonOperation<'c>
impl<'c> Unpin for PoisonOperation<'c>
impl<'c> UnwindSafe for PoisonOperation<'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