[llvm] [LLVM] Create `lf_alias` nodes for `typedef` and `using` (PR #153936)

via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 18 04:03:35 PST 2025


Nerixyz wrote:

> Would it be reasonable to still output the `lf_alias` node, but not use it as the variable type by default?
> 
> I remember a few months ago a patch for LLDB's `SymbolFileNativePDB` that fixed type lookups for typedef types (iirc @Nerixyz wrote it). It required a special code path that traversed the entire symbol stream looking for `S_UDT` nodes, and I think storing them too? That would no longer be necessary if the typedefs could be looked up directly in the type stream.

Just emitting the `LF_ALIAS` record in the type stream at first would be a good start too, assuming debuggers support this. As you say, this would (almost) make type lookups for typedefs work in LLDB - we'd only need to handle the record when looking through types.

I'm not sure if it's a good idea to output the record for struct members yet.

https://github.com/llvm/llvm-project/pull/153936


More information about the llvm-commits mailing list