diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-06-08 15:26:20 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-06-08 15:26:31 -0400 |
commit | 940da03e32c28144134d0373faf7fd5ea158f1ae (patch) | |
tree | a104a5666df69b0a45c5e5d04aba70cb10410dad /gdb/gnu-v3-abi.c | |
parent | b6cdac4b80c1d32726227305e16483cef9d40e2c (diff) | |
download | gdb-940da03e32c28144134d0373faf7fd5ea158f1ae.zip gdb-940da03e32c28144134d0373faf7fd5ea158f1ae.tar.gz gdb-940da03e32c28144134d0373faf7fd5ea158f1ae.tar.bz2 |
gdb: remove TYPE_FIELD_TYPE macro
Remove the `TYPE_FIELD_TYPE` macro, changing all the call sites to use
`type::field` and `field::type` directly.
gdb/ChangeLog:
* gdbtypes.h (TYPE_FIELD_TYPE): Remove. Change all call sites
to use type::field and field::type instead.
Change-Id: Ifda6226a25c811cfd334a756a9fbc5c0afdddff3
Diffstat (limited to 'gdb/gnu-v3-abi.c')
-rw-r--r-- | gdb/gnu-v3-abi.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c index 8aa3e68..23c9c94 100644 --- a/gdb/gnu-v3-abi.c +++ b/gdb/gnu-v3-abi.c @@ -182,7 +182,7 @@ vtable_ptrdiff_type (struct gdbarch *gdbarch) = (struct type *) gdbarch_data (gdbarch, vtable_type_gdbarch_data); /* The "offset_to_top" field has the appropriate (ptrdiff_t) type. */ - return TYPE_FIELD_TYPE (vtable_type, vtable_field_offset_to_top); + return vtable_type->field (vtable_field_offset_to_top).type (); } /* Return the offset from the start of the imaginary `struct @@ -221,7 +221,7 @@ gnuv3_dynamic_class (struct type *type) for (fieldnum = 0; fieldnum < TYPE_N_BASECLASSES (type); fieldnum++) if (BASETYPE_VIA_VIRTUAL (type, fieldnum) - || gnuv3_dynamic_class (TYPE_FIELD_TYPE (type, fieldnum))) + || gnuv3_dynamic_class (type->field (fieldnum).type ())) { TYPE_CPLUS_DYNAMIC (type) = 1; return 1; @@ -467,7 +467,7 @@ gnuv3_baseclass_offset (struct type *type, int index, { struct dwarf2_property_baton baton; baton.property_type - = lookup_pointer_type (TYPE_FIELD_TYPE (type, index)); + = lookup_pointer_type (type->field (index).type ()); baton.locexpr = *TYPE_FIELD_DWARF_BLOCK (type, index); struct dynamic_prop prop; @@ -550,7 +550,7 @@ gnuv3_find_method_in (struct type *domain, CORE_ADDR voffset, continue; pos = TYPE_BASECLASS_BITPOS (domain, i) / 8; - basetype = TYPE_FIELD_TYPE (domain, i); + basetype = domain->field (i).type (); /* Recurse with a modified adjustment. We don't need to adjust voffset. */ if (adjustment >= pos && adjustment < pos + TYPE_LENGTH (basetype)) @@ -1331,7 +1331,7 @@ is_copy_or_move_constructor_type (struct type *class_type, /* ...and the second argument should be the same as the class type, with the expected type code... */ - struct type *arg_type = TYPE_FIELD_TYPE (method_type, 1); + struct type *arg_type = method_type->field (1).type (); if (arg_type->code () != expected) return false; @@ -1345,7 +1345,7 @@ is_copy_or_move_constructor_type (struct type *class_type, constructor. */ for (int i = 2; i < method_type->num_fields (); i++) { - arg_type = TYPE_FIELD_TYPE (method_type, i); + arg_type = method_type->field (i).type (); /* FIXME aktemur/2019-10-31: As of this date, neither clang++-7.0.0 nor g++-8.2.0 produce a DW_AT_default_value attribute. GDB is also not set to read this attribute, yet. @@ -1529,7 +1529,7 @@ gnuv3_pass_by_reference (struct type *type) for (fieldnum = 0; fieldnum < type->num_fields (); fieldnum++) if (!field_is_static (&type->field (fieldnum))) { - struct type *field_type = TYPE_FIELD_TYPE (type, fieldnum); + struct type *field_type = type->field (fieldnum).type (); /* For arrays, make the decision based on the element type. */ if (field_type->code () == TYPE_CODE_ARRAY) |