Remove field_info::nfields member
authorTom Tromey <tromey@adacore.com>
Thu, 27 Feb 2020 21:05:49 +0000 (14:05 -0700)
committerTom Tromey <tromey@adacore.com>
Thu, 27 Feb 2020 21:56:35 +0000 (14:56 -0700)
commit317f712722993375935ff8f992410435fb8e2b27
tree26e6a11a42a0409fdc52231aabd3010c10613104
parent5f6028029146629b5fd5732e20c600b5837c20a9
Remove field_info::nfields member

I noticed that there's no real reason to have field_info::nfields in
the DWARF reader.  It simply mirrors information that is already
available.  This patch removes it, in favor of a convenience method.

gdb/ChangeLog
2020-02-27  Tom Tromey  <tromey@adacore.com>

* dwarf2/read.c (struct field_info) <nfields>: Now a method, not a
member.
(dwarf2_add_field): Don't update nfields.
(dwarf2_attach_fields_to_type, process_structure_scope): Update.
gdb/ChangeLog
gdb/dwarf2/read.c