Issue 152052
Summary [LLDB] [Native PDB] Add support for `lf_alias` for typedef types
Labels new issue
Assignees
Reporter Walnut356
    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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to