build_variant_names_type_di_node in rustc_codegen_llvm::debuginfo::metadata::enums::cpp_like - Rust
Description: This function builds a DW_AT_enumeration_type that contains an entry for each variant. Note that this has nothing to do with the discriminant. The numeric value of each enumerator corresponds to the variant index. The type is only used for efficiently encoding the name of each variant in debuginfo.

Skip to main content

## build_variant_names_type_di_node

# Function build_variant_names_type_di_node

Source

    fn build_variant_names_type_di_node<'ll, 'tcx>(
        cx: &GenericCx<'ll, FullCx<'ll, 'tcx>>,
        containing_scope: &'ll Metadata,
        variants: impl Iterator<Item = (VariantIdx, Cow<'tcx, str>)>,
        enum_def_id: Option<DefId>,
    ) -> &'ll Metadata

Expand description

This function builds a DW_AT_enumeration_type that contains an entry for each variant. Note that this has nothing to do with the discriminant. The numeric value of each enumerator corresponds to the variant index. The type is only used for efficiently encoding the name of each variant in debuginfo.