[−][src]Struct rustc_codegen_llvm::context::CodegenCx
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
There is one CodegenCx
per compilation unit. Each one has its own LLVM
llvm::Context
so that several compilation units may be optimized in parallel.
All other LLVM data structures in the CodegenCx
are tied to that llvm::Context
.
Fields
tcx: TyCtxt<'a, 'tcx, 'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
check_overflow: bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
use_dll_storage_attrs: bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
tls_model: ThreadLocalMode
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
llmod: &'a Module
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
llcx: &'a Context
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
stats: RefCell<Stats>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
codegen_unit: Arc<CodegenUnit<'tcx>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
instances: RefCell<FxHashMap<Instance<'tcx>, &'a Value>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Cache instances of monomorphic and polymorphic items
vtables: RefCell<FxHashMap<(Ty<'tcx>, Option<PolyExistentialTraitRef<'tcx>>), &'a Value>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Cache generated vtables
const_cstr_cache: RefCell<FxHashMap<LocalInternedString, &'a Value>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Cache of constant strings,
const_unsized: RefCell<FxHashMap<&'a Value, &'a Value>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Reverse-direction for const ptrs cast from globals. Key is a Value holding a *T, Val is a Value holding a *[T].
Needed because LLVM loses pointer->pointee association when we ptrcast, and we have to ptrcast during codegen of a [T] const because we form a slice, a (*T,usize) pair, not a pointer to an LLVM array type. Similar for trait objects.
const_globals: RefCell<FxHashMap<&'a Value, &'a Value>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Cache of emitted const globals (value -> global)
statics_to_rauw: RefCell<Vec<(&'a Value, &'a Value)>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
List of globals for static variables which need to be passed to the LLVM function ReplaceAllUsesWith (RAUW) when codegen is complete. (We have to make sure we don't invalidate any Values referring to constants.)
used_statics: RefCell<Vec<&'a Value>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Statics that will be placed in the llvm.used variable See http://llvm.org/docs/LangRef.html#the-llvm-used-global-variable for details
lltypes: RefCell<FxHashMap<(Ty<'tcx>, Option<usize>), &'a Type>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
scalar_lltypes: RefCell<FxHashMap<Ty<'tcx>, &'a Type>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pointee_infos: RefCell<FxHashMap<(Ty<'tcx>, Size), Option<PointeeInfo>>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
isize_ty: &'a Type
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
dbg_cx: Option<CrateDebugContext<'a, 'tcx>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
eh_personality: Cell<Option<&'a Value>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
eh_unwind_resume: Cell<Option<&'a Value>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
rust_try_fn: Cell<Option<&'a Value>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
intrinsics: RefCell<FxHashMap<&'static str, &'a Value>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
local_gen_sym_counter: Cell<usize>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
A counter that is used for generating local symbol names
Methods
impl<'a, 'tcx> CodegenCx<'a, 'tcx>
[src]
impl<'a, 'tcx> CodegenCx<'a, 'tcx>
pub(crate) fn new(
tcx: TyCtxt<'a, 'tcx, 'tcx>,
codegen_unit: Arc<CodegenUnit<'tcx>>,
llvm_module: &'a ModuleLlvm
) -> CodegenCx<'a, 'tcx>
[src]
pub(crate) fn new(
tcx: TyCtxt<'a, 'tcx, 'tcx>,
codegen_unit: Arc<CodegenUnit<'tcx>>,
llvm_module: &'a ModuleLlvm
) -> CodegenCx<'a, 'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'b, 'tcx> CodegenCx<'b, 'tcx>
[src]
impl<'b, 'tcx> CodegenCx<'b, 'tcx>
pub fn sess<'a>(&'a self) -> &'a Session
[src]
pub fn sess<'a>(&'a self) -> &'a Session
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_intrinsic(&self, key: &str) -> &'b Value
[src]
pub fn get_intrinsic(&self, key: &str) -> &'b Value
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn generate_local_symbol_name(&self, prefix: &str) -> String
[src]
pub fn generate_local_symbol_name(&self, prefix: &str) -> String
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Generate a new symbol name with the given prefix. This symbol name must
only be used for definitions with internal
or private
linkage.
pub fn eh_personality(&self) -> &'b Value
[src]
pub fn eh_personality(&self) -> &'b Value
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn eh_unwind_resume(&self) -> &'b Value
[src]
pub fn eh_unwind_resume(&self) -> &'b Value
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn type_needs_drop(&self, ty: Ty<'tcx>) -> bool
[src]
pub fn type_needs_drop(&self, ty: Ty<'tcx>) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn type_is_sized(&self, ty: Ty<'tcx>) -> bool
[src]
pub fn type_is_sized(&self, ty: Ty<'tcx>) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn type_is_freeze(&self, ty: Ty<'tcx>) -> bool
[src]
pub fn type_is_freeze(&self, ty: Ty<'tcx>) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn type_has_metadata(&self, ty: Ty<'tcx>) -> bool
[src]
pub fn type_has_metadata(&self, ty: Ty<'tcx>) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a, 'tcx> CodegenCx<'a, 'tcx>
[src]
impl<'a, 'tcx> CodegenCx<'a, 'tcx>
pub fn align_of(&self, ty: Ty<'tcx>) -> Align
[src]
pub fn align_of(&self, ty: Ty<'tcx>) -> Align
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn size_of(&self, ty: Ty<'tcx>) -> Size
[src]
pub fn size_of(&self, ty: Ty<'tcx>) -> Size
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn size_and_align_of(&self, ty: Ty<'tcx>) -> (Size, Align)
[src]
pub fn size_and_align_of(&self, ty: Ty<'tcx>) -> (Size, Align)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Trait Implementations
impl<'a, 'tcx> DepGraphSafe for CodegenCx<'a, 'tcx>
[src]
impl<'a, 'tcx> DepGraphSafe for CodegenCx<'a, 'tcx>
impl<'a, 'll, 'tcx> HasDataLayout for &'a CodegenCx<'ll, 'tcx>
[src]
impl<'a, 'll, 'tcx> HasDataLayout for &'a CodegenCx<'ll, 'tcx>
fn data_layout(&self) -> &TargetDataLayout
[src]
fn data_layout(&self) -> &TargetDataLayout
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a, 'll, 'tcx> HasTargetSpec for &'a CodegenCx<'ll, 'tcx>
[src]
impl<'a, 'll, 'tcx> HasTargetSpec for &'a CodegenCx<'ll, 'tcx>
fn target_spec(&self) -> &Target
[src]
fn target_spec(&self) -> &Target
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'tcx, 'a, 'll> HasTyCtxt<'tcx> for &'a CodegenCx<'ll, 'tcx>
[src]
impl<'tcx, 'a, 'll> HasTyCtxt<'tcx> for &'a CodegenCx<'ll, 'tcx>
fn tcx<'b>(&'b self) -> TyCtxt<'b, 'tcx, 'tcx>
[src]
fn tcx<'b>(&'b self) -> TyCtxt<'b, 'tcx, 'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a, 'll, 'tcx> LayoutOf for &'a CodegenCx<'ll, 'tcx>
[src]
impl<'a, 'll, 'tcx> LayoutOf for &'a CodegenCx<'ll, 'tcx>
type Ty = Ty<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
type TyLayout = TyLayout<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn layout_of(self, ty: Ty<'tcx>) -> Self::TyLayout
[src]
fn layout_of(self, ty: Ty<'tcx>) -> Self::TyLayout
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow(&self) -> &T
[src]
fn borrow(&self) -> &T
Immutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more
impl<E> SpecializationError for E
[src]
impl<E> SpecializationError for E
fn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized,
[src]
fn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Create an error for a missing method specialization. Defaults to panicking with type, trait & method names. S
is the encoder/decoder state type, T
is the type being encoded/decoded, and the arguments are the names of the trait and method that should've been overridden. Read more
impl<T> Erased for T
[src]
impl<T> Erased for T
impl<T> Send for T where
T: ?Sized,
[src]
impl<T> Send for T where
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
impl<T> Sync for T where
T: ?Sized,
impl<T> Erased for T
impl<T> Erased for T
impl<T> MaybeResult for T
[src]
impl<T> MaybeResult for T
fn from_ok(x: T) -> T
[src]
fn from_ok(x: T) -> T
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn map_same<F>(self, f: F) -> T where
F: FnOnce(T) -> T,
[src]
fn map_same<F>(self, f: F) -> T where
F: FnOnce(T) -> T,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a, T> Captures for T where
T: ?Sized,
[src]
impl<'a, T> Captures for T where
T: ?Sized,