File tree Expand file tree Collapse file tree
lldb/source/Plugins/SymbolFile/DWARF Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3206,6 +3206,19 @@ void DWARFASTParserClang::ParseSingleMember(
32063206 this_field_info.bit_size = *clang_type_size * character_width;
32073207 }
32083208
3209+ dw_offset_t this_type_die_offset =
3210+ attrs.encoding_form .Reference ().GetOffset ();
3211+ bool same_name = attrs.name == last_field_info.name ||
3212+ (attrs.name && last_field_info.name &&
3213+ llvm::StringRef (attrs.name ) == last_field_info.name );
3214+ if (same_name && this_type_die_offset == last_field_info.type_die_offset &&
3215+ this_field_info.bit_offset == last_field_info.bit_offset &&
3216+ this_field_info.bit_size == last_field_info.bit_size ) {
3217+ return ;
3218+ }
3219+ this_field_info.name = attrs.name ;
3220+ this_field_info.type_die_offset = this_type_die_offset;
3221+
32093222 if (this_field_info.GetFieldEnd () <= last_field_info.GetEffectiveFieldEnd ())
32103223 this_field_info.SetEffectiveFieldEnd (
32113224 last_field_info.GetEffectiveFieldEnd ());
Original file line number Diff line number Diff line change @@ -305,6 +305,9 @@ class DWARFASTParserClang : public lldb_private::plugin::dwarf::DWARFASTParser {
305305 // / Set to 'true' if this field is DW_AT_artificial.
306306 bool is_artificial = false ;
307307
308+ const char *name = nullptr ;
309+ dw_offset_t type_die_offset = DW_INVALID_OFFSET ;
310+
308311 FieldInfo () = default ;
309312
310313 void SetIsBitfield (bool flag) { is_bitfield = flag; }
You can’t perform that action at this time.
0 commit comments