================
@@ -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
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to