pub struct GetGlobalOperation<'c> { /* private fields */ }
Expand description
A get_global
operation. Get the memref pointing to a global variable.
The memref.get_global
operation retrieves the memref pointing to a
named global variable. If the global variable is marked constant, writing
to the result memref (such as through a memref.store
operation) is
undefined.
Example:
%x = memref.get_global @foo : memref<2xf32>
Implementations§
source§impl<'c> GetGlobalOperation<'c>
impl<'c> GetGlobalOperation<'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>
) -> GetGlobalOperationBuilder<'c, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> GetGlobalOperationBuilder<'c, Unset, Unset>
Creates a builder.
pub fn result(&self) -> Result<OperationResult<'c, '_>, Error>
pub fn _name(&self) -> Result<FlatSymbolRefAttribute<'c>, Error>
pub fn set_name(&mut self, value: FlatSymbolRefAttribute<'c>)
Trait Implementations§
source§impl<'c> From<GetGlobalOperation<'c>> for Operation<'c>
impl<'c> From<GetGlobalOperation<'c>> for Operation<'c>
source§fn from(operation: GetGlobalOperation<'c>) -> Self
fn from(operation: GetGlobalOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for GetGlobalOperation<'c>
impl<'c> !Send for GetGlobalOperation<'c>
impl<'c> !Sync for GetGlobalOperation<'c>
impl<'c> Unpin for GetGlobalOperation<'c>
impl<'c> UnwindSafe for GetGlobalOperation<'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