[llvm] [AsmPrinter][DebugNames] Implement DW_IDX_parent entries (PR #77457)
Felipe de Azevedo Piovezan via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 10 04:17:38 PST 2024
felipepiovezan wrote:
> > C++ doesn't allow it, but clang does generate this for C++ when using type homing/`-fno-standalone-debug`. Try this:
> > ```
> > struct A {
> > A();
> > struct B { };
> > };
> > A::B b;
> > ```
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > compiled with `-fno-standalone-debug` (or on a non-mac platform, where that's the default): https://godbolt.org/z/rYvPxPMcY
>
> I was hoping to hear this response as I figured it must be, but wanted to make sure.
I wasn't aware of this, but we can probably fix it by saying: "If B's parent is a declaration, don't add B's parent offset" to the table, i.e., B won't have an IDX_Parent. This is needed so that we fallback to the mechanism of parsing the entire CU.
Isn't this flag making it impossible to find `A`? Looking at the godbolt link, any queries for `A` in the accelerator table will return false, and debuggers will never find it, since accelerator tables are not allowed to produce false negatives.
https://github.com/llvm/llvm-project/pull/77457
More information about the llvm-commits
mailing list