pub struct NullOperation<'c> { /* private fields */ }
Expand description
A mlir.null
operation. Defines a value containing a null pointer to LLVM type..
Unlike LLVM IR, MLIR does not have first-class null pointers. They must be
explicitly created as SSA values using llvm.mlir.null
. This operation has
no operands or attributes, and returns a null value of a wrapped LLVM IR
pointer type.
Examples:
// Null pointer to i8.
%0 = llvm.mlir.null : !llvm.ptr<i8>
// Null pointer to a function with signature void().
%1 = llvm.mlir.null : !llvm.ptr<func<void ()>>
Implementations§
source§impl<'c> NullOperation<'c>
impl<'c> NullOperation<'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>
) -> NullOperationBuilder<'c, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> NullOperationBuilder<'c, Unset>
Creates a builder.
pub fn res(&self) -> Result<OperationResult<'c, '_>, Error>
Trait Implementations§
source§impl<'c> From<NullOperation<'c>> for Operation<'c>
impl<'c> From<NullOperation<'c>> for Operation<'c>
source§fn from(operation: NullOperation<'c>) -> Self
fn from(operation: NullOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for NullOperation<'c>
impl<'c> !Send for NullOperation<'c>
impl<'c> !Sync for NullOperation<'c>
impl<'c> Unpin for NullOperation<'c>
impl<'c> UnwindSafe for NullOperation<'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