Module base

Source

Functions§

allocator_kind_for_codegen
Decide allocator kind to codegen. If Some(_) this will be the same as tcx.allocator_kind, but it may be None in more cases (e.g. if using allocator definitions from a dylib dependency).
bin_op_to_fcmp_predicate 🔒
bin_op_to_icmp_predicate 🔒
build_shift_expr_rhs 🔒
Returns rhs sufficiently masked, truncated, and/or extended so that it can be used to shift lhs: it has the same size as lhs, and the value, when interpreted unsigned (no matter its type), will not exceed the size of lhs.
cast_to_dyn_star 🔒
Coerces src to dst_ty which is guaranteed to be a dyn* type.
codegen_crate
codegen_instance 🔒
coerce_unsized_into 🔒
Coerces src, which is a reference to a value of type src_ty, to a value of type dst_ty, and stores the result in dst.
collect_debugger_visualizers_transitive
This function returns all of the debugger visualizers specified for the current crate as well as all upstream crates transitively that match the visualizer_type specified.
compare_simd_types
determine_cgu_reuse
get_argc_argv 🔒
Obtain the argc and argv values to pass to the rust start function (i.e., the “start” lang item).
is_call_from_compiler_builtins_to_upstream_monomorphization
Returns whether a call from the current crate to the Instance would produce a call from compiler_builtins to a symbol the linker must resolve.
maybe_create_entry_wrapper
Creates the main function which will initialize the rust runtime and call users main function.
provide 🔒
unsize_ptr 🔒
Coerces src to dst_ty. src_ty must be a pointer.
unsized_info 🔒
Retrieves the information we are losing (making dynamic) in an unsizing adjustment.
validate_trivial_unsize
Codegen takes advantage of the additional assumption, where if the principal trait def id of what’s being casted doesn’t change, then we don’t need to adjust the vtable at all. This corresponds to the fact that dyn Tr<A>: Unsize<dyn Tr<B>> requires that A = B; we don’t allow upcasting objects between the same trait with different args. If we, for some reason, were to relax the Unsize trait, it could become unsound, so let’s validate here that the trait refs are subtypes.
wants_msvc_seh
Returns true if this session’s target will use SEH-based unwinding.
wants_new_eh_instructions 🔒
Returns true if this session’s target requires the new exception handling LLVM IR instructions (catchpad / cleanuppad / … instead of landingpad)
wants_wasm_eh