aboutsummaryrefslogtreecommitdiff
path: root/gdb/cp-support.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-support.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-support.c')
-rw-r--r--gdb/cp-support.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/cp-support.c b/gdb/cp-support.c
index bc9e8d4..1e54aae 100644
--- a/gdb/cp-support.c
+++ b/gdb/cp-support.c
@@ -207,11 +207,11 @@ inspect_type (struct demangle_parse_info *info,
If the symbol is typedef and its type name is the same
as the symbol's name, e.g., "typedef struct foo foo;". */
- if (TYPE_NAME (type) != nullptr
- && strcmp (TYPE_NAME (type), name) == 0)
+ if (type->name () != nullptr
+ && strcmp (type->name (), name) == 0)
return 0;
- is_anon = (TYPE_NAME (type) == NULL
+ is_anon = (type->name () == NULL
&& (type->code () == TYPE_CODE_ENUM
|| type->code () == TYPE_CODE_STRUCT
|| type->code () == TYPE_CODE_UNION));
@@ -1278,7 +1278,7 @@ add_symbol_overload_list_adl_namespace (struct type *type,
type = TYPE_TARGET_TYPE (type);
}
- type_name = TYPE_NAME (type);
+ type_name = type->name ();
if (type_name == NULL)
return;