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/p-valprint.c | |
parent | d0e39ea27cde07011967ab74d39cf13dfe3370c4 (diff) | |
download | binutils-gdb-7d93a1e0b6af703c75daa93456608f8bb5f34f13.tar.gz |
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/p-valprint.c')
-rw-r--r-- | gdb/p-valprint.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c index 8172e049233..44dcbf9dc42 100644 --- a/gdb/p-valprint.c +++ b/gdb/p-valprint.c @@ -423,9 +423,9 @@ pascal_value_print (struct value *val, struct ui_file *stream, /* Hack: remove (char *) for char strings. Their type is indicated by the quoted string anyway. */ if (type->code () == TYPE_CODE_PTR - && TYPE_NAME (type) == NULL - && TYPE_NAME (TYPE_TARGET_TYPE (type)) != NULL - && strcmp (TYPE_NAME (TYPE_TARGET_TYPE (type)), "char") == 0) + && type->name () == NULL + && TYPE_TARGET_TYPE (type)->name () != NULL + && strcmp (TYPE_TARGET_TYPE (type)->name (), "char") == 0) { /* Print nothing. */ } @@ -469,7 +469,7 @@ const char pascal_vtbl_ptr_name[] = int pascal_object_is_vtbl_ptr_type (struct type *type) { - const char *type_name = TYPE_NAME (type); + const char *type_name = type->name (); return (type_name != NULL && strcmp (type_name, pascal_vtbl_ptr_name) == 0); @@ -564,7 +564,7 @@ pascal_object_print_value_fields (struct value *val, struct ui_file *stream, fprintf_filtered (stream, "\n"); print_spaces_filtered (2 + 2 * recurse, stream); fputs_filtered ("members of ", stream); - fputs_filtered (TYPE_NAME (type), stream); + fputs_filtered (type->name (), stream); fputs_filtered (": ", stream); } } @@ -710,7 +710,7 @@ pascal_object_print_value (struct value *val, struct ui_file *stream, { LONGEST boffset = 0; struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i)); - const char *basename = TYPE_NAME (baseclass); + const char *basename = baseclass->name (); int skip = 0; if (BASETYPE_VIA_VIRTUAL (type, i)) |