build_discr_member_di_node in rustc_codegen_llvm::debuginfo::metadata::enums::native - Rust
Description: Builds the DW_TAG_member describing where we can find the tag of an enum. Returns `None` if the enum does not have a tag.

Skip to main content

## build_discr_member_di_node

# Function build_discr_member_di_node

Source

    fn build_discr_member_di_node<'ll, 'tcx>(
        cx: &GenericCx<'ll, FullCx<'ll, 'tcx>>,
        enum_or_coroutine_type_and_layout: TyAndLayout<'tcx>,
        enum_or_coroutine_type_di_node: &'ll Metadata,
    ) -> Option<&'ll Metadata>

Expand description

Builds the DW_TAG_member describing where we can find the tag of an enum. Returns `None` if the enum does not have a tag.

          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)