This adds a new attribute::as_virtuality method and changes the DWARF
reader to use it. This also ensures that the attibute's form will now
be respected.
gdb/ChangeLog
2020-09-29 Tom Tromey <tom@tromey.com>
* dwarf2/read.c (dwarf2_add_field, dwarf2_add_member_fn): Update.
* dwarf2/attribute.h (struct attribute) <as_virtuality>: New
method.
* dwarf2/attribute.c (attribute::as_virtuality): New method.