[clang] [llvm] [clang][DebugInfo] Add virtual call-site target information in DWARF. (PR #167666)
Carlos Alberto Enciso via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 23 23:34:56 PST 2025
CarlosAlbertoEnciso wrote:
@OCHyams mentioned:
> Is it not bending the spec a little to have DW_AT_call_origin be a subprogram reference for a virtual call (which is indirect)? Possibly naively, would it make more sense for this this point to the global _vtable$ variable DIE? I might have completely the wrong end of the stick here.
@tromey mentioned:
> I think this means that a virtual call should be represented by a DW_AT_call_target with a DWARF expression that finds the call target, i.e., by finding the correct slot in the vtable.
>From these comments, I am sensing that for virtual calls, instead of adding a new attribute, an alternative solution could be to use the `DW_AT_call_target` with an expression involving the global `_vtable$` variable and extra information to find the correct slot?
https://github.com/llvm/llvm-project/pull/167666
More information about the llvm-commits
mailing list