pub struct MirProgram {
pub functions: PrimaryMap<MirFuncId, MirFunction>,
pub function_names: BTreeMap<String, MirFuncId>,
pub structs: Vec<MirStructDecl>,
pub enums: Vec<MirEnumDecl>,
}Expand description
Whole-program MIR container.
function_names provides fast lookup from source-level function name
to MIR function id.
Fields§
§functions: PrimaryMap<MirFuncId, MirFunction>Functions stored in the MIR program arena.
function_names: BTreeMap<String, MirFuncId>Lookup table from canonical function name to function id.
structs: Vec<MirStructDecl>Struct declarations referenced by MIR.
enums: Vec<MirEnumDecl>Enum declarations referenced by MIR.
Implementations§
Source§impl MirProgram
impl MirProgram
Sourcepub fn function_count(&self) -> usize
pub fn function_count(&self) -> usize
Return the number of functions stored in the MIR program.
Trait Implementations§
Source§impl Clone for MirProgram
impl Clone for MirProgram
Source§fn clone(&self) -> MirProgram
fn clone(&self) -> MirProgram
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MirProgram
impl RefUnwindSafe for MirProgram
impl Send for MirProgram
impl Sync for MirProgram
impl Unpin for MirProgram
impl UnwindSafe for MirProgram
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