llvm-project
4625c8f0 - [LLDB][NativePDB] Add modifiers to modified type name (#159296)

Commit
1 day ago
[LLDB][NativePDB] Add modifiers to modified type name (#159296) When creating LLDB types from `LF_MODIFIER` records, the type name of the modified type was used. This didn't include the modifiers (`const`/`volatile`/`__unaligned`). With this PR, they're included. The DIA plugin had a test for this. That test also assumed that function types had a name. I removed that check here, because function/procedure types themselves in PDB don't have a name: ``` 0x1015 | LF_ARGLIST [size = 20, hash = 0xBCB6] 0x0074 (int): `int` 0x1013: `int* __restrict` 0x1014: `int& __restrict` 0x1016 | LF_PROCEDURE [size = 16, hash = 0x3F611] return type = 0x0003 (void), # args = 3, param list = 0x1015 calling conv = cdecl, options = None ``` I assume DIA gets the name from the function symbol itself. In the native plugin, that name isn't included and multiple functions with the same signature will reuse one type, whereas DIA would create a new type for each function. The [Shell/SymbolFile/PDB/func-symbols.test](https://github.com/llvm/llvm-project/blob/b29c7ded31d81ca47aed0157c543c8b6a0f5866c/lldb/test/Shell/SymbolFile/PDB/func-symbols.test) also relies on this.
Author
Parents
Loading