[llvm] [AsmPrinter][DebugNames] Implement DW_IDX_parent entries (PR #77457)

Felipe de Azevedo Piovezan via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 11 05:31:38 PST 2024


felipepiovezan wrote:

> So, for now, a B entry could, yeah, be missing its parent info and the consumer could find B then check parse some DIEs to check the parentage. 

Yeah, that's what the implementation will do: just fall back to existing behavior. We won't regress existing behavior for the cases where `no-standalone-debug` causes debug information to be deleted.

> perhaps we could put an unnamed entry for A to refer to as the parent? Then it'd be relatively quick to check only that DIE to see what its name is?

It can't be unnamed, because we need to check that the name is "A". But at the same time, it cannot be named because a debugger querying just "A" should never find it (it is a declaration). It really sounds like `no-standalone-debug` was not considered during standardization.

But even using `no-standalone-debug`, with the current version of the patch we will still improve queries for DIEs that were not optimized away, and not regress ones that were.

https://github.com/llvm/llvm-project/pull/77457


More information about the llvm-commits mailing list