<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/77696>77696</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
.debug_names entry referring to skeleton type unit
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
dwblaikie,
ayermolo
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
dwblaikie
</td>
</tr>
</table>
<pre>
When using `.debug_names` and Type Units, two entries for the type are produced ( https://godbolt.org/z/7Pd67afn7 ):
```
struct t1 { };
t1 v1;
```
```
Hash: 0x59796A
String: 0x00000085 "t1"
Entry @ 0xa8 {
Abbrev: 0x26c
Tag: DW_TAG_structure_type
DW_IDX_type_unit: 0x00
DW_IDX_die_offset: 0x00000023
}
Entry @ 0xaf {
Abbrev: 0x268
Tag: DW_TAG_structure_type
DW_IDX_die_offset: 0x0000002e
}
```
```
DW_TAG_structure_type
DW_AT_calling_convention (DW_CC_pass_by_value)
DW_AT_name ("t1")
DW_AT_byte_size (0x01)
DW_AT_decl_file ("/app/example.cpp")
DW_AT_decl_line (1)
```
```
DW_TAG_structure_type
DW_AT_declaration (true)
DW_AT_signature (0xc6694e51369161f2)
```
Probably only want the type unit entry for the type in the index.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykVMGO6jYU_RpnYz3k3BAnWWTBDKXt7kmdarqLnPgG3GdsZDsMeV9fOWQgQ_umqmohweWcc318bR3hvdobxJrkTwRAvrVaqG8KCQCBZwIgRnRHq238I98mYggH6-obL2mtHOvXAxo6eGX2lHC2ktgO-8aII3rCGRVG0pfxhPR3o4In8EzDm6VoglPoaW8dDQekITKEQ3pyVg4dSkqgpIcQTp5kGwI7Aru9la3VYWXdnsDuO4Fd8VXyQvSmoASqyGNbwjaEs_kzlT64oQs0pJQUT5QUW5I9XZGQ0nN6qx5kDyWN6xfhDyTbUHbJq6LimwVEfwtOmf0VZdMqc0oAQhqHtyD-ZIIbKVkzyi6ijKaWKKWbtnV4vjYC3n0EX8S0xfa1edn83FyPNjhs4vw-Mrevza_bPyagGYwK785m1gxLhY3te49h6RyyZa84sh_57xf-Pxov_7Pxzy29s25uPr-vf9lo89J0Qmtl9k1nzRlNUNYQVhEot6_N83NzEt437dichR4wvq6lND7uK_l2wTfGw7oK2jFg49X3WcUuLH3sKbHTTa_0vTGBnTidCOzwIo4njasuVvCPQq3MLLw3_r8Dio2FE_fJBPf3UcQAEVH_frKO82qNeZrxKuVpDz-y89XZVrR6pNbokb4JE-5BEN_rFBHjx4BQZvqtjMTLKpF1JqusEgnWacHWFeTAITnUHHGdlSWDjud5xztZllnf5pkQUOZMlomqgcGapSkDgJTBKi9yKTMh8l62PMeerBkehdIrrc_HmDeJ8n7Auih4xRMtWtR-zkyDb3QC54h0ddR8aYe9J2umlQ_-3iWooLFeJuR8Soc9upgfNFjqv6HGYM19FsngdP0QhiochnbV2SOBXdxg_vpycvZP7AKB3WTLx5iMtv8KAAD__8GotUk">