[Lldb-commits] [lldb] Reapply [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #92328)
Zequan Wu via lldb-commits
lldb-commits at lists.llvm.org
Fri May 17 08:58:57 PDT 2024
================
@@ -2306,6 +2345,11 @@ bool DWARFASTParserClang::CompleteTypeFromDWARF(const DWARFDIE &die,
if (!die)
return false;
+ ParsedDWARFTypeAttributes attrs(die);
----------------
ZequanWu wrote:
> How exactly do we get here in that case?
>From https://github.com/llvm/llvm-project/pull/90663#issuecomment-2105194128, .debug_names somehow contains entries that are declarations. This causes `SymbolFileDWARF::FindDefinitionTypeForDWARFDeclContext` to return a type created from declaration when searching for definition.
A simple idea I have in mind is to make the `GetForwardDeclCompilerTypeToDIE`'s value type to a pair `{DIERef, bool}`, and the bool indicate if this is a definition or not. So we know that info without extra attribute parsing. How do you think?
https://github.com/llvm/llvm-project/pull/92328
More information about the lldb-commits
mailing list