================ @@ -362,6 +369,23 @@ void ManualDWARFIndex::IndexUnitImpl(DWARFUnit &unit, set.namespaces.Insert(ConstString(name), ref); break; + case DW_TAG_member: { + // In DWARF 4 and earlier `static const` members of a struct, a class or a + // union have an entry tag `DW_TAG_member`, and are also tagged as + // `DW_AT_external` and `DW_AT_declaration`, but otherwise follow the + // same rules as `DW_TAG_variable`. + if (unit.GetVersion() >= 5) + break; + bool parent_is_class_type = false; + if (auto parent = die.GetParent()) { + parent_is_class_type = parent->Tag() == DW_TAG_structure_type || + parent->Tag() == DW_TAG_class_type || + parent->Tag() == DW_TAG_union_type; + } ---------------- labath wrote:
```suggestion bool parent_is_class_type = false; if (auto parent = die.GetParent()) parent_is_class_type = DWARFDIE(&unit, parent).IsStructUnionOrClass(); ``` https://github.com/llvm/llvm-project/pull/111859 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits