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.