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/c-valprint.c | |
parent | d0e39ea27cde07011967ab74d39cf13dfe3370c4 (diff) | |
download | gdb-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/c-valprint.c')
-rw-r--r-- | gdb/c-valprint.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index d117248..7d5feb3 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -78,7 +78,7 @@ c_textual_element_type (struct type *type, char format) while (iter_type) { /* Check the name of the type. */ - if (TYPE_NAME (iter_type) && textual_name (TYPE_NAME (iter_type))) + if (iter_type->name () && textual_name (iter_type->name ())) return 1; if (iter_type->code () != TYPE_CODE_TYPEDEF) @@ -521,11 +521,11 @@ c_value_print (struct value *val, struct ui_file *stream, (Don't use c_textual_element_type here; quoted strings are always exactly (char *), (wchar_t *), or the like. */ if (original_type->code () == TYPE_CODE_PTR - && TYPE_NAME (original_type) == NULL - && TYPE_NAME (TYPE_TARGET_TYPE (original_type)) != NULL - && (strcmp (TYPE_NAME (TYPE_TARGET_TYPE (original_type)), + && original_type->name () == NULL + && TYPE_TARGET_TYPE (original_type)->name () != NULL + && (strcmp (TYPE_TARGET_TYPE (original_type)->name (), "char") == 0 - || textual_name (TYPE_NAME (TYPE_TARGET_TYPE (original_type))))) + || textual_name (TYPE_TARGET_TYPE (original_type)->name ()))) { /* Print nothing. */ } @@ -598,14 +598,14 @@ c_value_print (struct value *val, struct ui_file *stream, < TYPE_LENGTH (value_enclosing_type (val))))) val = value_cast (real_type, val); fprintf_filtered (stream, "(%s%s) ", - TYPE_NAME (real_type), + real_type->name (), full ? "" : _(" [incomplete object]")); } else if (type != check_typedef (value_enclosing_type (val))) { /* No RTTI information, so let's do our best. */ fprintf_filtered (stream, "(%s ?) ", - TYPE_NAME (value_enclosing_type (val))); + value_enclosing_type (val)->name ()); val = value_cast (value_enclosing_type (val), val); } } |