[Lldb-commits] [lldb] [lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (PR #90663)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Fri May 3 11:05:06 PDT 2024


================
@@ -154,6 +154,27 @@ static bool TagIsRecordType(dw_tag_t tag) {
   }
 }
 
+static bool
+IsForwardDeclaration(const lldb_private::plugin::dwarf::DWARFDIE &die,
+                     const ParsedDWARFTypeAttributes &attrs,
+                     LanguageType cu_language) {
+  if (attrs.byte_size && *attrs.byte_size == 0 && attrs.name &&
----------------
clayborg wrote:

Do we want to check `attrs.is_forward_declaration` before doing any of this and quick return? Then only do this more expensive `if` check if `attrs.is_forward_declaration` is false?

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


More information about the lldb-commits mailing list