[PATCH] D73282: Fix debug-info generation for block invocations so that we set the LinkageName instead of the Name
Shafik Yaghmour via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 28 15:02:51 PST 2020
shafik added a comment.
Example as requested, using the same code from `clang/test/CodeGenCXX/debug-info-block-invocation-linkage-name.cpp` the DWARF for block created in `f()` and passed to `g()` as an argument changes from:
0x00000052: DW_TAG_subprogram
DW_AT_low_pc (0x0000000000000060)
DW_AT_high_pc (0x0000000000000089)
DW_AT_frame_base (DW_OP_reg6 RBP)
DW_AT_name ("___Z1fU13block_pointerFviE_block_invoke")
DW_AT_decl_file ("block_demangle_3.cpp")
DW_AT_decl_line (4)
to
0x00000056: DW_TAG_subprogram
DW_AT_low_pc (0x0000000000000060)
DW_AT_high_pc (0x000000000000008c)
DW_AT_frame_base (DW_OP_reg6 RBP)
DW_AT_linkage_name ("___Z1fU13block_pointerFviE_block_invoke")
DW_AT_decl_file ("block_demangle_3.cpp")
DW_AT_decl_line (4)
With the only change being that the mangled name `___Z1fU13block_pointerFviE_block_invoke` instead of ended up in `DW_AT_name` end up in `DW_AT_linkage_name`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73282/new/
https://reviews.llvm.org/D73282
More information about the cfe-commits
mailing list