[][src]Struct llir::Module

pub struct Module<'ctx>(_, _);

LLVM Module

Implementations

impl<'ctx> Module<'ctx>[src]

pub fn iter_functions(&self) -> ValueIterator<'ctx, Function<'ctx>>[src]

Iterate all functions inside the module

for func in module.iter_functions() {
  // Do things with func
}

pub fn get_function(&self, name: &str) -> Option<Function<'ctx>>[src]

Get the function by name

pub fn iter_global_variables(&self) -> ValueIterator<'ctx, GlobalVariable<'ctx>>[src]

Iterate all globals variables

for glob in module.iter_global_variables() {
  // Do things with glob
}

pub fn get_global_variable(&self, name: &str) -> Option<GlobalVariable<'ctx>>[src]

Get global variable by name

pub fn iter_global_aliases(&self) -> ValueIterator<'ctx, GlobalAlias<'ctx>>[src]

Iterate all global aliases

for glob_alias in module.iter_global_aliases() {
  // Do things with global alias
}

pub fn get_global_alias(&self, name: &str) -> Option<GlobalAlias<'ctx>>[src]

Get global alias by name

pub fn iter_globals(&self) -> GlobalIterator<'ctx>[src]

Iterate all globals, including global variables and global aliases

for glob in module.iter_globals() {
  match glob {
    Global::Variable(v) => { /* ... */ },
    Global::Alias(a) => { /* ... */ },
  }
}

Trait Implementations

impl<'ctx> Send for Module<'ctx>[src]

impl<'ctx> Sync for Module<'ctx>[src]

Auto Trait Implementations

impl<'ctx> RefUnwindSafe for Module<'ctx>

impl<'ctx> Unpin for Module<'ctx>

impl<'ctx> UnwindSafe for Module<'ctx>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.