rustc_codegen_ssa::debuginfo

Function wants_c_like_enum_debuginfo

source
pub fn wants_c_like_enum_debuginfo<'tcx>(
    tcx: TyCtxt<'tcx>,
    enum_type_and_layout: TyAndLayout<'tcx>,
) -> bool
Expand description

Returns true if we want to generate a DW_TAG_enumeration_type description for this instead of a DW_TAG_struct_type with DW_TAG_variant_part.

NOTE: This is somewhat inconsistent right now: For empty enums and enums with a single fieldless variant, we generate DW_TAG_struct_type, although a DW_TAG_enumeration_type would be a better fit.