From 7d93a1e0b6af703c75daa93456608f8bb5f34f13 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Sat, 16 May 2020 12:16:06 -0400 Subject: 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. --- gdb/valarith.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gdb/valarith.c') 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 -- cgit v1.1