pub(super) fn build_enum_type_di_node<'ll, 'tcx>(
    cx: &CodegenCx<'ll, 'tcx>,
    unique_type_id: UniqueTypeId<'tcx>
) -> DINodeCreationResult<'ll>
Expand description

Build the debuginfo node for an enum type. The listing below shows how such a type looks like at the LLVM IR/DWARF level. It is a DW_TAG_structure_type with a single DW_TAG_variant_part that in turn contains a DW_TAG_variant for each variant of the enum. The variant-part also contains a single member describing the discriminant, and a nested struct type for each of the variants.

 ---> DW_TAG_structure_type              (top-level type for enum)
        DW_TAG_variant_part              (variant part)
          DW_AT_discr                    (reference to discriminant DW_TAG_member)
          DW_TAG_member                  (discriminant member)
          DW_TAG_variant                 (variant 1)
          DW_TAG_variant                 (variant 2)
          DW_TAG_variant                 (variant 3)
        DW_TAG_structure_type            (type of variant 1)
        DW_TAG_structure_type            (type of variant 2)
        DW_TAG_structure_type            (type of variant 3)