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).
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
.
Coerces src
to dst_ty
which is guaranteed to be a dyn*
type.
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
.
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.
Obtain the argc
and argv
values to pass to the rust start function.
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.
Creates the main
function which will initialize the rust runtime and call
users main function.
Coerces src
to dst_ty
. src_ty
must be a pointer.
Retrieves the information we are losing (making dynamic) in an unsizing
adjustment.
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.
Returns true
if this session’s target will use SEH-based unwinding.
Returns true
if this session’s target requires the new exception
handling LLVM IR instructions (catchpad / cleanuppad / … instead
of landingpad)