diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-05-16 12:16:06 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-05-16 12:36:05 -0400 |
commit | 7d93a1e0b6af703c75daa93456608f8bb5f34f13 (patch) | |
tree | 463f7922a76e4a9341095339498726b65be181db /gdb/ax-gdb.c | |
parent | d0e39ea27cde07011967ab74d39cf13dfe3370c4 (diff) | |
download | binutils-7d93a1e0b6af703c75daa93456608f8bb5f34f13.zip binutils-7d93a1e0b6af703c75daa93456608f8bb5f34f13.tar.gz binutils-7d93a1e0b6af703c75daa93456608f8bb5f34f13.tar.bz2 |
gdb: remove TYPE_NAME macro
Remove `TYPE_NAME`, changing all the call sites to use `type::name`
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_NAME): Remove. Change all cal sites to use
type::name instead.
Diffstat (limited to 'gdb/ax-gdb.c')
-rw-r--r-- | gdb/ax-gdb.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c index 57ba210..0f389e4 100644 --- a/gdb/ax-gdb.c +++ b/gdb/ax-gdb.c @@ -520,7 +520,7 @@ gen_fetch (struct agent_expr *ax, struct type *type) type. Error out and give callers a chance to handle the failure gracefully. */ error (_("gen_fetch: Unsupported type code `%s'."), - TYPE_NAME (type)); + type->name ()); } } @@ -1533,7 +1533,7 @@ gen_struct_ref (struct agent_expr *ax, struct axs_value *value, if (!found) error (_("Couldn't find member named `%s' in struct/union/class `%s'"), - field, TYPE_NAME (type)); + field, type->name ()); } static int @@ -1629,7 +1629,7 @@ gen_namespace_elt (struct agent_expr *ax, struct axs_value *value, if (!found) error (_("No symbol \"%s\" in namespace \"%s\"."), - name, TYPE_NAME (curtype)); + name, curtype->name ()); return found; } @@ -1644,7 +1644,7 @@ static int gen_maybe_namespace_elt (struct agent_expr *ax, struct axs_value *value, const struct type *curtype, char *name) { - const char *namespace_name = TYPE_NAME (curtype); + const char *namespace_name = curtype->name (); struct block_symbol sym; sym = cp_lookup_symbol_namespace (namespace_name, name, @@ -2354,9 +2354,9 @@ gen_expr_binop_rest (struct expression *exp, if (type->code () != TYPE_CODE_ARRAY && type->code () != TYPE_CODE_PTR) { - if (TYPE_NAME (type)) + if (type->name ()) error (_("cannot subscript something of type `%s'"), - TYPE_NAME (type)); + type->name ()); else error (_("cannot subscript requested type")); } |