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/coffread.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/coffread.c')
-rw-r--r-- | gdb/coffread.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/coffread.c b/gdb/coffread.c index c08c9de..fc44e53 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -1463,13 +1463,13 @@ patch_type (struct type *type, struct type *real_type) TYPE_FIELDS (real_target), field_size); - if (TYPE_NAME (real_target)) + if (real_target->name ()) { /* The previous copy of TYPE_NAME is allocated by process_coff_symbol. */ - if (TYPE_NAME (target)) - xfree ((char*) TYPE_NAME (target)); - target->set_name (xstrdup (TYPE_NAME (real_target))); + if (target->name ()) + xfree ((char*) target->name ()); + target->set_name (xstrdup (real_target->name ())); } } @@ -1658,7 +1658,7 @@ process_coff_symbol (struct coff_symbol *cs, SYMBOL_DOMAIN (sym) = VAR_DOMAIN; /* If type has no name, give it one. */ - if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0) + if (SYMBOL_TYPE (sym)->name () == 0) { if (SYMBOL_TYPE (sym)->code () == TYPE_CODE_PTR || SYMBOL_TYPE (sym)->code () == TYPE_CODE_FUNC) @@ -1715,7 +1715,7 @@ process_coff_symbol (struct coff_symbol *cs, /* Some compilers try to be helpful by inventing "fake" names for anonymous enums, structures, and unions, like "~0fake" or ".0fake". Thanks, but no thanks... */ - if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0) + if (SYMBOL_TYPE (sym)->name () == 0) if (sym->linkage_name () != NULL && *sym->linkage_name () != '~' && *sym->linkage_name () != '.') |