diff options
author | Michael Buch <michaelbuch12@gmail.com> | 2025-01-17 15:27:48 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-17 15:27:48 +0000 |
commit | 7c729418d721147bf1f2b257afd30f84721888ad (patch) | |
tree | acf0c99e48cecc581aed2ef1cb8b7999642d0037 /llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp | |
parent | ba44d7ba1fb3e27f51d65ea1af280e00382e09e0 (diff) | |
download | llvm-7c729418d721147bf1f2b257afd30f84721888ad.zip llvm-7c729418d721147bf1f2b257afd30f84721888ad.tar.gz llvm-7c729418d721147bf1f2b257afd30f84721888ad.tar.bz2 |
[llvm][DebugInfo] Attach object-pointer to DISubprogram declarations (#122742)
Currently Clang only attaches `DW_AT_object_pointer` to
`DW_TAG_subprogram` definitions. LLDB constructs C++ method types from
their `DW_TAG_subprogram` declaration, which is also the point at which
it needs to determine whether a method is static or not. LLDB's
heuristic for this could be very simple if we emitted
`DW_AT_object_pointer` on declarations. But since we don't, LLDB has to
guess whether an argument is an implicit object parameter based on the
DW_AT_name and DW_AT_type.
To simplify LLDB's job (and to eventually support C++23's explicit
object parameters), this patch adds the `DIFlagObjectPointer` to
`DISubprogram` declarations.
For reference, GCC attaches the object-pointer DIE to both the
definition and declaration: https://godbolt.org/z/3TWjTfWon
Fixes https://github.com/llvm/llvm-project/issues/120973
Diffstat (limited to 'llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions