Skip to main content

## build_vtable_type_di_node

# Function build_vtable_type_di_node

Source

    fn build_vtable_type_di_node<'ll, 'tcx>(
        cx: &GenericCx<'ll, FullCx<'ll, 'tcx>>,
        ty: Ty<'tcx>,
        poly_trait_ref: Option<ExistentialTraitRef<'tcx>>,
    ) -> &'ll Metadata

Expand description

Generates LLVM debuginfo for a vtable.

The vtable type looks like a struct with a field for each function pointer and super-trait pointer it contains (plus the `size` and `align` fields).

Except for `size`, `align`, and `drop_in_place`, the field names don’t try to mirror the name of the method they implement. This can be implemented in the future once there is a proper disambiguation scheme for dealing with methods from different traits that have the same name.