<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/64160>64160</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[DebugInfo] -fno-eliminate-unused-debug-types doesn't apply to enums
</td>
</tr>
<tr>
<th>Labels</th>
<td>
debuginfo
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
pogo59
</td>
</tr>
</table>
<pre>
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.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEU82O3CwQfBp8aY2F8c-MDz7sfqP5tJccoo1yxqZtE2GwoJnRvH0EO9kfKVIkyzZNV3V10cgQ9GIRB9Y-s_ZcyEir88PuFtf2xejUffhfX9ECrQizM8bdtF0guOgnBCZOs3cb6BAiQlf3fc9Ez-onxs-MP7GOP568DOTjRPB63xHY8fktCACANm4pAj9sDKiAHc-s_rSvLcFVmojA6jPw973PeSlnk9oycWKi_8qfK9IHpUeK3gKVmfQL3d90v66YJaKXpJ0FSnQ6WCaOBFmwtPfbih6Z-A-Cg_EOCmcZDWXbzj-fvl9AOXxAJmdJagsSFIbJ6z2zujknxzcLUr3Edlv1tIIOMGuL5UNefn9zfpPG3FOWtH9wWdskLYwIuGkiVEmOVCodG-v4YbbugEZv2krCwxvsoHCMyyGBQ0qC1d3wih5olQQBcQtgHQE5kPtu7unnk9BQwgtBWF00qizUUKu-7mWBQ9X1vOmavm-LdeCzamqBI9a86ZSomlN7xKpFleKtrAo9CC5qfhTHqq67ui0rLqTsBJ-nSRxPVc0ajpvUpjTmupXOL0UevKFrqo4XRo5oQh5kIXJD2s6OCZHm2g8JcxjjEljDjQ4UPlhIk8k34JxQLwnVnuHfTn0c6bsr2Y4iejOsRHtIV0FcmLgsmtY4lpPbmLikwo_PYffuF07ExCX3Epi45HZ-BwAA__83-yHr">