aboutsummaryrefslogtreecommitdiff
path: root/gdb/gnu-v2-abi.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-05-14 13:46:38 -0400
committerSimon Marchi <simon.marchi@efficios.com>2020-05-14 13:46:38 -0400
commit7813437494ac39f3aef392d06ed5416e84fe386b (patch)
tree15290bf5b2bd9d23c59103a6a42b99adc0111d6d /gdb/gnu-v2-abi.c
parent67607e24d0413828acdfa9bc38f6fbac40b860b9 (diff)
downloadgdb-7813437494ac39f3aef392d06ed5416e84fe386b.zip
gdb-7813437494ac39f3aef392d06ed5416e84fe386b.tar.gz
gdb-7813437494ac39f3aef392d06ed5416e84fe386b.tar.bz2
gdb: remove TYPE_CODE macro
Remove TYPE_CODE, changing all the call sites to use type::code directly. This is quite a big diff, but this was mostly done using sed and coccinelle. A few call sites were done by hand. gdb/ChangeLog: * gdbtypes.h (TYPE_CODE): Remove. Change all call sites to use type::code instead.
Diffstat (limited to 'gdb/gnu-v2-abi.c')
-rw-r--r--gdb/gnu-v2-abi.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/gnu-v2-abi.c b/gdb/gnu-v2-abi.c
index a9b2e0a..bf438a8 100644
--- a/gdb/gnu-v2-abi.c
+++ b/gdb/gnu-v2-abi.c
@@ -132,8 +132,8 @@ gnuv2_virtual_fn_field (struct value **arg1p, struct fn_field * f, int j,
/* With older versions of g++, the vtbl field pointed to an array
of structures. Nowadays it points directly to the structure. */
- if (TYPE_CODE (value_type (vtbl)) == TYPE_CODE_PTR
- && TYPE_CODE (TYPE_TARGET_TYPE (value_type (vtbl))) == TYPE_CODE_ARRAY)
+ if (value_type (vtbl)->code () == TYPE_CODE_PTR
+ && TYPE_TARGET_TYPE (value_type (vtbl))->code () == TYPE_CODE_ARRAY)
{
/* Handle the case where the vtbl field points to an
array of structures. */
@@ -155,7 +155,7 @@ gnuv2_virtual_fn_field (struct value **arg1p, struct fn_field * f, int j,
entry_type = check_typedef (value_type (entry));
- if (TYPE_CODE (entry_type) == TYPE_CODE_STRUCT)
+ if (entry_type->code () == TYPE_CODE_STRUCT)
{
/* Move the `this' pointer according to the virtual function table. */
set_value_offset (arg1, value_offset (arg1)
@@ -169,7 +169,7 @@ gnuv2_virtual_fn_field (struct value **arg1p, struct fn_field * f, int j,
vfn = value_field (entry, 2);
}
- else if (TYPE_CODE (entry_type) == TYPE_CODE_PTR)
+ else if (entry_type->code () == TYPE_CODE_PTR)
vfn = entry;
else
error (_("I'm confused: virtual function table has bad type"));
@@ -206,7 +206,7 @@ gnuv2_value_rtti_type (struct value *v, int *full, LONGEST *top, int *using_enc)
known_type = value_type (v);
known_type = check_typedef (known_type);
/* RTTI works only or class objects. */
- if (TYPE_CODE (known_type) != TYPE_CODE_STRUCT)
+ if (known_type->code () != TYPE_CODE_STRUCT)
return NULL;
/* Plan on this changing in the future as i get around to setting
@@ -314,7 +314,7 @@ vb_match (struct type *type, int index, struct type *basetype)
it is for this baseclass. */
fieldtype = TYPE_FIELD_TYPE (type, index);
if (fieldtype == NULL
- || TYPE_CODE (fieldtype) != TYPE_CODE_PTR)
+ || fieldtype->code () != TYPE_CODE_PTR)
/* "Can't happen". */
return 0;