pub struct ModuleOperation<'c> { /* private fields */ }
Expand description
A module
operation. A top level container operation.
A module
represents a top-level container operation. It contains a single
graph region containing a single block
which can contain any operations and does not have a terminator. Operations
within this region cannot implicitly capture values defined outside the module,
i.e. Modules are IsolatedFromAbove. Modules have
an optional symbol name which can be used to refer
to them in operations.
Example:
module {
func.func @foo()
}
Implementations§
source§impl<'c> ModuleOperation<'c>
impl<'c> ModuleOperation<'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>
) -> ModuleOperationBuilder<'c, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> ModuleOperationBuilder<'c, Unset>
Creates a builder.
pub fn body_region(&self) -> Result<RegionRef<'c, '_>, Error>
pub fn sym_name(&self) -> Result<StringAttribute<'c>, Error>
pub fn set_sym_name(&mut self, value: StringAttribute<'c>)
pub fn remove_sym_name(&mut self) -> Result<(), Error>
pub fn sym_visibility(&self) -> Result<StringAttribute<'c>, Error>
pub fn set_sym_visibility(&mut self, value: StringAttribute<'c>)
pub fn remove_sym_visibility(&mut self) -> Result<(), Error>
Trait Implementations§
source§impl<'c> From<ModuleOperation<'c>> for Operation<'c>
impl<'c> From<ModuleOperation<'c>> for Operation<'c>
source§fn from(operation: ModuleOperation<'c>) -> Self
fn from(operation: ModuleOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for ModuleOperation<'c>
impl<'c> !Send for ModuleOperation<'c>
impl<'c> !Sync for ModuleOperation<'c>
impl<'c> Unpin for ModuleOperation<'c>
impl<'c> UnwindSafe for ModuleOperation<'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