pub struct Context {
pub modules: Arena<ModuleContent>,
pub functions: Arena<FunctionContent>,
pub blocks: Arena<BlockContent>,
pub values: Arena<ValueContent>,
pub pointers: Arena<PointerContent>,
pub aggregates: Arena<AggregateContent>,
pub asm_blocks: Arena<AsmBlockContent>,
pub metadata: Arena<Metadatum>,
/* private fields */
}
Expand description
The main IR context handle.
Every module, function, block and value is stored here. Some aggregate metadata is also managed by the context.
Fields
modules: Arena<ModuleContent>
functions: Arena<FunctionContent>
blocks: Arena<BlockContent>
values: Arena<ValueContent>
pointers: Arena<PointerContent>
aggregates: Arena<AggregateContent>
asm_blocks: Arena<AsmBlockContent>
metadata: Arena<Metadatum>
Implementations
sourceimpl Context
impl Context
sourcepub fn module_iter(&self) -> ModuleIteratorⓘNotable traits for ModuleIteratorimpl Iterator for ModuleIterator type Item = Module;
pub fn module_iter(&self) -> ModuleIteratorⓘNotable traits for ModuleIteratorimpl Iterator for ModuleIterator type Item = Module;
Return an interator for every module in this context.
sourcepub fn get_unique_name(&mut self) -> String
pub fn get_unique_name(&mut self) -> String
Get a globally unique symbol.
The name will be in the form "anon_N"
, where N
is an incrementing decimal.
sourcepub fn get_unique_id(&mut self) -> u64
pub fn get_unique_id(&mut self) -> u64
Get a globally unique symbol id.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more