<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/152052>152052</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[LLDB] [Native PDB] Add support for `lf_alias` for typedef types
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Walnut356
</td>
</tr>
</table>
<pre>
Outlined [here](https://github.com/llvm/llvm-project/issues/114906#issuecomment-3152608683).
>[Local variables store their type via a type index](https://github.com/microsoft/microsoft-pdb/blob/805655a28bd8198004be2ac27e6e0290121a5e89/include/cvinfo.h#L4193), this is also true for [global variables](https://github.com/microsoft/microsoft-pdb/blob/805655a28bd8198004be2ac27e6e0290121a5e89/include/cvinfo.h#L3632). Since typedef nodes don't live in the type stream, variables cannot have typedefs as types. <br/><br/>The front-end asks the `TypeSystem` about the type of a variable, but the `TypeSystem` and `SymbolFile` can't tell the difference between an `unsigned char var;` and a `uint8_t var;` because the actual type-node referenced by the variable will always be the underlying raw `unsigned char` node.
MSVC currently doesn't output `lf_alias` either, but it would solve some issues, especially for third-party languages. `lf_alias` appears to be the equivalent of `DW_TAG_typedef`, so it would result in better feature parity with dwarf debug info.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzMVE2P4zYM_TXKhZhAkT_iHHKYj00v0w9gBt3jgLLoWK0iuRKV1P--kDPZmcUeeuilgAELssnH90g-TMkePdFeNA-ieVph5jHE_Vd0PnPVtCsdzLz_NbOzngyI5mGkSKJ5EqobmackqnuhDkIdjpbHrNd9OAl1cO58e91NMfxBPQt1sCllSkIdNpt6J1uhquWmD6cTeb6rNo1qZdd2lVC7tZD35am-iObhOfTo4IzRonaUIHGIBDySjcDzRHC2CHg9Wm_o738t8GT7GFIY-PP5bjJaqIN2obw62bRNg6rTptvsOilrTQp7taWWpNrJjdpgQ92uEPO9y4aEOvRn64ewHoWqnuv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