diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-05-07 11:17:33 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-05-07 11:32:29 -0400 |
commit | 5c54719c22b14f526e72be39a793657ac73d36c5 (patch) | |
tree | 339567d0f226aa8d56b356d606dec359be1c86e6 /gdb/dwarf2/read.c | |
parent | 24e99c6c3c78e38a9919c9f8e8b831713f8303a3 (diff) | |
download | gdb-5c54719c22b14f526e72be39a793657ac73d36c5.zip gdb-5c54719c22b14f526e72be39a793657ac73d36c5.tar.gz gdb-5c54719c22b14f526e72be39a793657ac73d36c5.tar.bz2 |
gdb: make add_dyn_prop a method of struct type
Move add_dyn_prop, currently a free function, to be a method of struct
type.
gdb/ChangeLog:
* gdbtypes.h (struct type) <add_dyn_prop>: New method.
(add_dyn_prop): Remove. Update all users to use
type::add_dyn_prop.
* gdbtypes.c (add_dyn_prop): Rename to...
(type::add_dyn_prop): ... this.
Diffstat (limited to 'gdb/dwarf2/read.c')
-rw-r--r-- | gdb/dwarf2/read.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 1813085..ac20899 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -9218,7 +9218,7 @@ alloc_rust_variant (struct obstack *obstack, struct type *type, prop.kind = PROP_VARIANT_PARTS; prop.data.variant_parts = prop_value; - add_dyn_prop (DYN_PROP_VARIANT_PARTS, prop, type); + type->add_dyn_prop (DYN_PROP_VARIANT_PARTS, prop); } /* Some versions of rustc emitted enums in an unusual way. @@ -14706,7 +14706,7 @@ add_variant_property (struct field_info *fip, struct type *type, = ((gdb::array_view<variant_part> *) obstack_copy (&objfile->objfile_obstack, &parts, sizeof (parts))); - add_dyn_prop (DYN_PROP_VARIANT_PARTS, prop, type); + type->add_dyn_prop (DYN_PROP_VARIANT_PARTS, prop); } /* Create the vector of fields, and attach it to the type. */ @@ -15355,7 +15355,7 @@ read_structure_type (struct die_info *die, struct dwarf2_cu *cu) struct dynamic_prop prop; if (attr_to_dynamic_prop (attr, die, cu, &prop, cu->per_cu->addr_type ())) - add_dyn_prop (DYN_PROP_BYTE_SIZE, prop, type); + type->add_dyn_prop (DYN_PROP_BYTE_SIZE, prop); TYPE_LENGTH (type) = 0; } } @@ -23605,7 +23605,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) { struct type *prop_type = cu->per_cu->addr_sized_int_type (false); if (attr_to_dynamic_prop (attr, die, cu, &prop, prop_type)) - add_dyn_prop (DYN_PROP_ALLOCATED, prop, type); + type->add_dyn_prop (DYN_PROP_ALLOCATED, prop); } else if (attr != NULL) { @@ -23620,7 +23620,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) { struct type *prop_type = cu->per_cu->addr_sized_int_type (false); if (attr_to_dynamic_prop (attr, die, cu, &prop, prop_type)) - add_dyn_prop (DYN_PROP_ASSOCIATED, prop, type); + type->add_dyn_prop (DYN_PROP_ASSOCIATED, prop); } else if (attr != NULL) { @@ -23633,7 +23633,7 @@ set_die_type (struct die_info *die, struct type *type, struct dwarf2_cu *cu) attr = dwarf2_attr (die, DW_AT_data_location, cu); if (attr_to_dynamic_prop (attr, die, cu, &prop, cu->per_cu->addr_type ())) - add_dyn_prop (DYN_PROP_DATA_LOCATION, prop, type); + type->add_dyn_prop (DYN_PROP_DATA_LOCATION, prop); if (dwarf2_per_objfile->die_type_hash == NULL) dwarf2_per_objfile->die_type_hash |