[PATCH] D95617: [DWARF] Inlined variables with no location should not have a DW_TAG_variable
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 6 18:21:28 PDT 2021
dblaikie added a comment.
Oh, interesting note I just realized in some other code I was investigating (for https://bugs.llvm.org/show_bug.cgi?id=49769 ) - this sort of change should be made for non-inline functions too. WEll, specifically non-inline functions that have an abstract origin.
eg:
void do_stuff();
__attribute__((always_inline)) void f1() {
int i;
do_stuff();
}
void f2() { f1(); }
$ clang++-tot -O1 test.cpp -g -c && llvm-dwarfdump-tot test.o
...
0x0000002a: DW_TAG_subprogram
DW_AT_low_pc (0x0000000000000000)
DW_AT_high_pc (0x0000000000000008)
DW_AT_frame_base (DW_OP_reg7 RSP)
DW_AT_GNU_all_call_sites (true)
DW_AT_abstract_origin (0x0000005b "_Z2f1v")
0x0000003d: DW_TAG_variable
DW_AT_abstract_origin (0x00000067 "i")
0x00000042: DW_TAG_GNU_call_site
DW_AT_abstract_origin (0x00000050 "_Z8do_stuffv")
DW_AT_low_pc (0x0000000000000006)
0x0000004f: NULL
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95617/new/
https://reviews.llvm.org/D95617
More information about the llvm-commits
mailing list