# Function rustc_codegen_llvm::debuginfo::metadata::enums::cpp_like::build_variant_names_type_di_node

source ·

    fn build_variant_names_type_di_node<'ll, 'tcx>(
        cx: &CodegenCx<'ll, 'tcx>,
        containing_scope: &'ll DIType,
        variants: impl Iterator<Item = (VariantIdx, Cow<'tcx, str>)>,
    ) -> &'ll DIType

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.