Skip to content

[DebugInfo] -fno-eliminate-unused-debug-types doesn't apply to nested enums #64160

@pogo59

Description

@pogo59

Given the following source (from issue 63999):

struct Type {
    enum { Unused };
    int value = 0;
};
int main() {
    Type t;
    return t.value;
}

The enumeration type isn't used anywhere, so by default the DWARF doesn't contain a description of the unused enum, which is fine.

Normally, an unused type can be emitted by adding -fno-eliminate-unused-debug-types however that seems not to apply to unused enums. It should.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions