aboutsummaryrefslogtreecommitdiff
path: root/gdb/cp-valprint.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/cp-valprint.c
parentd0e39ea27cde07011967ab74d39cf13dfe3370c4 (diff)
downloadfsf-binutils-gdb-7d93a1e0b6af703c75daa93456608f8bb5f34f13.zip
fsf-binutils-gdb-7d93a1e0b6af703c75daa93456608f8bb5f34f13.tar.gz
fsf-binutils-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/cp-valprint.c')
-rw-r--r--gdb/cp-valprint.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c
index 799bdb1..1fb7edd 100644
--- a/gdb/cp-valprint.c
+++ b/gdb/cp-valprint.c
@@ -61,7 +61,7 @@ const char vtbl_ptr_name[] = "__vtbl_ptr_type";
int
cp_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, vtbl_ptr_name));
}
@@ -207,7 +207,7 @@ cp_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);
}
}
@@ -411,7 +411,7 @@ cp_print_value (struct value *val, struct ui_file *stream,
LONGEST boffset = 0;
int skip = 0;
struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i));
- const char *basename = TYPE_NAME (baseclass);
+ const char *basename = baseclass->name ();
struct value *base_val = NULL;
if (BASETYPE_VIA_VIRTUAL (type, i))
@@ -708,7 +708,7 @@ cp_print_class_member (const gdb_byte *valaddr, struct type *type,
const char *name;
fputs_filtered (prefix, stream);
- name = TYPE_NAME (self_type);
+ name = self_type->name ();
if (name)
fputs_filtered (name, stream);
else