diff options
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 8aa3e68f123..23c9c940ca3 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) |