pub struct GlobalCtorsOperation<'c> { /* private fields */ }
Expand description
A mlir.global_ctors
operation. LLVM dialect global_ctors..
Specifies a list of constructor functions and priorities. The functions
referenced by this array will be called in ascending order of priority (i.e.
lowest first) when the module is loaded. The order of functions with the
same priority is not defined. This operation is translated to LLVM’s
global_ctors global variable. The initializer functions are run at load
time. The data
field present in LLVM’s global_ctors variable is not
modeled here.
Examples:
llvm.mlir.global_ctors {@ctor}
llvm.func @ctor() {
...
llvm.return
}
Implementations§
source§impl<'c> GlobalCtorsOperation<'c>
impl<'c> GlobalCtorsOperation<'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>
) -> GlobalCtorsOperationBuilder<'c, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> GlobalCtorsOperationBuilder<'c, Unset, Unset>
Creates a builder.
pub fn ctors(&self) -> Result<ArrayAttribute<'c>, Error>
pub fn set_ctors(&mut self, value: ArrayAttribute<'c>)
pub fn priorities(&self) -> Result<ArrayAttribute<'c>, Error>
pub fn set_priorities(&mut self, value: ArrayAttribute<'c>)
Trait Implementations§
source§impl<'c> From<GlobalCtorsOperation<'c>> for Operation<'c>
impl<'c> From<GlobalCtorsOperation<'c>> for Operation<'c>
source§fn from(operation: GlobalCtorsOperation<'c>) -> Self
fn from(operation: GlobalCtorsOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for GlobalCtorsOperation<'c>
impl<'c> !Send for GlobalCtorsOperation<'c>
impl<'c> !Sync for GlobalCtorsOperation<'c>
impl<'c> Unpin for GlobalCtorsOperation<'c>
impl<'c> UnwindSafe for GlobalCtorsOperation<'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