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/mdebugread.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/mdebugread.c')
-rw-r--r-- | gdb/mdebugread.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c index cd08d26..9ad9c66 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -1296,7 +1296,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend, add_symbol (s, top_stack->cur_st, top_stack->cur_block); /* Incomplete definitions of structs should not get a name. */ - if (TYPE_NAME (SYMBOL_TYPE (s)) == NULL + if (SYMBOL_TYPE (s)->name () == NULL && (TYPE_NFIELDS (SYMBOL_TYPE (s)) != 0 || (SYMBOL_TYPE (s)->code () != TYPE_CODE_STRUCT && SYMBOL_TYPE (s)->code () != TYPE_CODE_UNION))) @@ -1675,8 +1675,8 @@ parse_type (int fd, union aux_ext *ax, unsigned int aux_index, int *bs, (.Fxx or .xxfake or empty) for unnamed struct/union/enums. */ if (name[0] == '.' || name[0] == '\0') tp->set_name (NULL); - else if (TYPE_NAME (tp) == NULL - || strcmp (TYPE_NAME (tp), name) != 0) + else if (tp->name () == NULL + || strcmp (tp->name (), name) != 0) tp->set_name (obstack_strdup (&mdebugread_objfile->objfile_obstack, name)); } @@ -1711,8 +1711,8 @@ parse_type (int fd, union aux_ext *ax, unsigned int aux_index, int *bs, bad_tag_guess_complaint (sym_name); tp->set_code (type_code); } - if (TYPE_NAME (tp) == NULL - || strcmp (TYPE_NAME (tp), name) != 0) + if (tp->name () == NULL + || strcmp (tp->name (), name) != 0) tp->set_name (obstack_strdup (&mdebugread_objfile->objfile_obstack, name)); } |