Skip to content

debuginfo: Extraneous descriptions of enum discriminator are emitted #12840

Closed
@vadimcn

Description

@vadimcn

This probably isn't a huge deal, but... if one were to examine the output of llvm-dwarfdump for, say, libstd (if compiled with -g flag), you'd find that rustc emits a description of the type of enum discriminator field for each monomorphization of generic enums. For Option alone, there's probably a couple hundred of them.
I think this is unnecessary, because discriminator never depends on enum's type parameters, so all monomorphizations could share the same discriminator description.

Edit: This doesn't apply, of course, to optimized forms of Option, such as Option<&T>, which don't have the discriminator field to begin with.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions