Skip to main content

Module base

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).
allocator_shim_contents
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.
codegen_crate
codegen_global_asm
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.
collect_eii_linkage ๐Ÿ”’
compare_simd_types
determine_cgu_reuse
eii_linkage_needed ๐Ÿ”’
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.
needs_allocator_shim_for_linking ๐Ÿ”’
Decide if this particular crate type needs an allocator shim linked in. This may return true even when allocator_kind_for_codegen returns false. In this case no allocator shim shall be linked.
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