diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-05-14 13:46:38 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-05-14 13:46:38 -0400 |
commit | 7813437494ac39f3aef392d06ed5416e84fe386b (patch) | |
tree | 15290bf5b2bd9d23c59103a6a42b99adc0111d6d /gdb/amd64-tdep.c | |
parent | 67607e24d0413828acdfa9bc38f6fbac40b860b9 (diff) | |
download | gdb-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/amd64-tdep.c')
-rw-r--r-- | gdb/amd64-tdep.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index c846447..9fa5d2b 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -546,8 +546,8 @@ static void amd64_classify (struct type *type, enum amd64_reg_class theclass[2]) static bool amd64_has_unaligned_fields (struct type *type) { - if (TYPE_CODE (type) == TYPE_CODE_STRUCT - || TYPE_CODE (type) == TYPE_CODE_UNION) + if (type->code () == TYPE_CODE_STRUCT + || type->code () == TYPE_CODE_UNION) { for (int i = 0; i < TYPE_NFIELDS (type); i++) { @@ -603,8 +603,8 @@ amd64_classify_aggregate_field (struct type *type, int i, if (field_is_static (&TYPE_FIELD (type, i)) || bitsize == 0) return; - if (TYPE_CODE (subtype) == TYPE_CODE_STRUCT - || TYPE_CODE (subtype) == TYPE_CODE_UNION) + if (subtype->code () == TYPE_CODE_STRUCT + || subtype->code () == TYPE_CODE_UNION) { /* Each field of an object is classified recursively. */ int j; @@ -667,7 +667,7 @@ amd64_classify_aggregate (struct type *type, enum amd64_reg_class theclass[2]) calculated according to the classes of the fields in the eightbyte: */ - if (TYPE_CODE (type) == TYPE_CODE_ARRAY) + if (type->code () == TYPE_CODE_ARRAY) { struct type *subtype = check_typedef (TYPE_TARGET_TYPE (type)); @@ -681,8 +681,8 @@ amd64_classify_aggregate (struct type *type, enum amd64_reg_class theclass[2]) int i; /* Structure or union. */ - gdb_assert (TYPE_CODE (type) == TYPE_CODE_STRUCT - || TYPE_CODE (type) == TYPE_CODE_UNION); + gdb_assert (type->code () == TYPE_CODE_STRUCT + || type->code () == TYPE_CODE_UNION); for (i = 0; i < TYPE_NFIELDS (type); i++) amd64_classify_aggregate_field (type, i, theclass, 0); @@ -708,7 +708,7 @@ amd64_classify_aggregate (struct type *type, enum amd64_reg_class theclass[2]) static void amd64_classify (struct type *type, enum amd64_reg_class theclass[2]) { - enum type_code code = TYPE_CODE (type); + enum type_code code = type->code (); int len = TYPE_LENGTH (type); theclass[0] = theclass[1] = AMD64_NO_CLASS; |