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/dwarf2/expr.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/dwarf2/expr.c')
-rw-r--r-- | gdb/dwarf2/expr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/dwarf2/expr.c b/gdb/dwarf2/expr.c index 243f493..14ffae4 100644 --- a/gdb/dwarf2/expr.c +++ b/gdb/dwarf2/expr.c @@ -146,9 +146,9 @@ dwarf_expr_context::fetch (int n) static void dwarf_require_integral (struct type *type) { - if (TYPE_CODE (type) != TYPE_CODE_INT - && TYPE_CODE (type) != TYPE_CODE_CHAR - && TYPE_CODE (type) != TYPE_CODE_BOOL) + if (type->code () != TYPE_CODE_INT + && type->code () != TYPE_CODE_CHAR + && type->code () != TYPE_CODE_BOOL) error (_("integral type expected in DWARF expression")); } @@ -363,7 +363,7 @@ dwarf_expr_require_composition (const gdb_byte *op_ptr, const gdb_byte *op_end, static int base_types_equal_p (struct type *t1, struct type *t2) { - if (TYPE_CODE (t1) != TYPE_CODE (t2)) + if (t1->code () != t2->code ()) return 0; if (TYPE_UNSIGNED (t1) != TYPE_UNSIGNED (t2)) return 0; |