Shivam Kunwar b163ba6e19
[DebugInfo] Lower DW_OP_LLVM_implicit_pointer to DWARF (#186763)
This patch adds backend support by intercepting
`DW_OP_LLVM_implicit_pointer` during variable DIE emission in
DwarfCompileUnit. For each implicit pointer variable, an artificial
`DW_TAG_variable` DIE is created to describe the dereferenced value's
location, and the pointer variable's location is emitted as
`DW_OP_implicit_pointer` referencing that artificial DIE.

Constant integer entries are de-duplicated so that multiple pointer
variables referencing the same constant value share a single artificial
DIE.

Emits `DW_OP_implicit_pointer` for DWARF 5 and
`DW_OP_GNU_implicit_pointer` for DWARF 4.

Here is the RFC with the design
https://discourse.llvm.org/t/rfc-implementing-dw-op-implicit-pointer-support-in-llvm/90217

---------

Co-authored-by: Shivam Kunwar <phyBrackets@users.noreply.github.com>
2026-03-27 09:34:57 +05:30
..