aboutsummaryrefslogtreecommitdiff
path: root/gdb/eval.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-05-16 12:16:06 -0400
committerSimon Marchi <simon.marchi@efficios.com>2020-05-16 12:36:05 -0400
commit7d93a1e0b6af703c75daa93456608f8bb5f34f13 (patch)
tree463f7922a76e4a9341095339498726b65be181db /gdb/eval.c
parentd0e39ea27cde07011967ab74d39cf13dfe3370c4 (diff)
downloadgdb-7d93a1e0b6af703c75daa93456608f8bb5f34f13.zip
gdb-7d93a1e0b6af703c75daa93456608f8bb5f34f13.tar.gz
gdb-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/eval.c')
-rw-r--r--gdb/eval.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/eval.c b/gdb/eval.c
index 7c45df0..ea08602 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -989,13 +989,13 @@ evaluate_funcall (type *expect_type, expression *exp, int *pos,
function_name = NULL;
if (type->code () == TYPE_CODE_NAMESPACE)
{
- function = cp_lookup_symbol_namespace (TYPE_NAME (type),
+ function = cp_lookup_symbol_namespace (type->name (),
name,
get_selected_block (0),
VAR_DOMAIN).symbol;
if (function == NULL)
error (_("No symbol \"%s\" in namespace \"%s\"."),
- name, TYPE_NAME (type));
+ name, type->name ());
tem = 1;
/* arg2 is left as NULL on purpose. */
@@ -2327,9 +2327,9 @@ evaluate_subexp_standard (struct type *expect_type,
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"));
}
@@ -2370,7 +2370,7 @@ evaluate_subexp_standard (struct type *expect_type,
else
{
error (_("cannot subscript something of type `%s'"),
- TYPE_NAME (value_type (arg1)));
+ value_type (arg1)->name ());
}
}
@@ -2392,9 +2392,9 @@ evaluate_subexp_standard (struct type *expect_type,
break;
default:
- 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"));
}