[][src]Struct rustc_middle::mir::mono::CodegenUnit

pub struct CodegenUnit<'tcx> {
    name: Symbol,
    items: FxHashMap<MonoItem<'tcx>, (Linkage, Visibility)>,
    size_estimate: Option<usize>,
}

Fields

name: Symbol

A name for this CGU. Incremental compilation requires that name be unique amongst all crates. Therefore, it should contain something unique to this crate (e.g., a module path) as well as the crate name and disambiguator.

items: FxHashMap<MonoItem<'tcx>, (Linkage, Visibility)>size_estimate: Option<usize>

Implementations

impl<'tcx> CodegenUnit<'tcx>[src]

pub fn new(name: Symbol) -> CodegenUnit<'tcx>[src]

pub fn name(&self) -> Symbol[src]

pub fn set_name(&mut self, name: Symbol)[src]

pub fn items(&self) -> &FxHashMap<MonoItem<'tcx>, (Linkage, Visibility)>[src]

pub fn items_mut(
    &mut self
) -> &mut FxHashMap<MonoItem<'tcx>, (Linkage, Visibility)>
[src]

pub fn mangle_name(human_readable_name: &str) -> String[src]

pub fn estimate_size(&mut self, tcx: TyCtxt<'tcx>)[src]

pub fn size_estimate(&self) -> usize[src]

pub fn modify_size_estimate(&mut self, delta: usize)[src]

pub fn contains_item(&self, item: &MonoItem<'tcx>) -> bool[src]

pub fn work_product_id(&self) -> WorkProductId[src]

pub fn work_product(&self, tcx: TyCtxt<'_>) -> WorkProduct[src]

pub fn items_in_deterministic_order(
    &self,
    tcx: TyCtxt<'tcx>
) -> Vec<(MonoItem<'tcx>, (Linkage, Visibility))>
[src]

pub fn codegen_dep_node(&self, tcx: TyCtxt<'tcx>) -> DepNode[src]

Trait Implementations

impl<'tcx> ArenaAllocatable<'tcx, CodegenUnit<'tcx>> for CodegenUnit<'tcx>[src]

impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for CodegenUnit<'tcx>[src]

Auto Trait Implementations

impl<'tcx> !RefUnwindSafe for CodegenUnit<'tcx>

impl<'tcx> !Send for CodegenUnit<'tcx>

impl<'tcx> !Sync for CodegenUnit<'tcx>

impl<'tcx> Unpin for CodegenUnit<'tcx>

impl<'tcx> !UnwindSafe for CodegenUnit<'tcx>

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<'a, T> Captures<'a> 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> MaybeResult<T> for T[src]

type Error = !

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.

impl<T> WithConstness for T[src]