aboutsummaryrefslogtreecommitdiff
path: root/gdb/valarith.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/valarith.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/valarith.c')
-rw-r--r--gdb/valarith.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/valarith.c b/gdb/valarith.c
index f1e1d6e..82e63a3 100644
--- a/gdb/valarith.c
+++ b/gdb/valarith.c
@@ -60,7 +60,7 @@ find_size_for_pointer_math (struct type *ptr_type)
{
const char *name;
- name = TYPE_NAME (ptr_target);
+ name = ptr_target->name ();
if (name == NULL)
error (_("Cannot perform pointer math on incomplete types, "
"try casting to a known type, or void *."));
@@ -888,8 +888,8 @@ value_args_as_target_float (struct value *arg1, struct value *arg2,
target_float_from_longest (x, *eff_type_x, value_as_long (arg1));
}
else
- error (_("Don't know how to convert from %s to %s."), TYPE_NAME (type1),
- TYPE_NAME (type2));
+ error (_("Don't know how to convert from %s to %s."), type1->name (),
+ type2->name ());
/* Obtain value of arg2, converting from other types if necessary. */
@@ -907,8 +907,8 @@ value_args_as_target_float (struct value *arg1, struct value *arg2,
target_float_from_longest (y, *eff_type_y, value_as_long (arg2));
}
else
- error (_("Don't know how to convert from %s to %s."), TYPE_NAME (type1),
- TYPE_NAME (type2));
+ error (_("Don't know how to convert from %s to %s."), type1->name (),
+ type2->name ());
}
/* A helper function that finds the type to use for a binary operation