Function rustc_trans::trans::adt::type_ofExperimental [-]  [+] [src]

pub fn type_of<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>, r: &Repr<'tcx>) -> Type

LLVM-level types are a little complicated.

C-like enums need to be actual ints, not wrapped in a struct, because that changes the ABI on some platforms (see issue #10308).

For nominal types, in some cases, we need to use LLVM named structs and fill in the actual contents in a second pass to prevent unbounded recursion; see also the comments in trans::type_of.