Add attribute::as_virtuality method
authorTom Tromey <tom@tromey.com>
Wed, 30 Sep 2020 00:49:08 +0000 (18:49 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 30 Sep 2020 02:29:07 +0000 (20:29 -0600)
commit23dca5c3d77252ad8000d749b4457f7e286b8367
tree72773528073caf42d22c15e61fb9f0452857fa3c
parent52c14d112840423f0515f7334063f532ec3950b1
Add attribute::as_virtuality method

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.
gdb/ChangeLog
gdb/dwarf2/attribute.c
gdb/dwarf2/attribute.h
gdb/dwarf2/read.c