[llvm] [DebugInfo] Add DW_AT_artificial for compiler generated static member. (PR #115851)

Carlos Alberto Enciso via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 14 03:34:58 PST 2024


CarlosAlbertoEnciso wrote:

For classes with virtual functions, Clang generates a class member `_vptr$XXX` with `XXX` being the class name. It points to the vtable function pointers.
```
DW_TAG_structure_type
  DW_AT_name	("MyClass")
  ...
  DW_TAG_member
    DW_AT_name	("_vptr$MyClass")
    DW_AT_type	(0x000000ba "int (**)()")
    DW_AT_data_member_location	(0x00)
    DW_AT_artificial	(true)
  ...
```

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


More information about the llvm-commits mailing list