aboutsummaryrefslogtreecommitdiff
path: root/gdb/cp-namespace.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-05-14 13:46:38 -0400
committerSimon Marchi <simon.marchi@efficios.com>2020-05-14 13:46:38 -0400
commit7813437494ac39f3aef392d06ed5416e84fe386b (patch)
tree15290bf5b2bd9d23c59103a6a42b99adc0111d6d /gdb/cp-namespace.c
parent67607e24d0413828acdfa9bc38f6fbac40b860b9 (diff)
downloadgdb-7813437494ac39f3aef392d06ed5416e84fe386b.zip
gdb-7813437494ac39f3aef392d06ed5416e84fe386b.tar.gz
gdb-7813437494ac39f3aef392d06ed5416e84fe386b.tar.bz2
gdb: remove TYPE_CODE macro
Remove TYPE_CODE, changing all the call sites to use type::code 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_CODE): Remove. Change all call sites to use type::code instead.
Diffstat (limited to 'gdb/cp-namespace.c')
-rw-r--r--gdb/cp-namespace.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c
index 3a2100d..517a071 100644
--- a/gdb/cp-namespace.c
+++ b/gdb/cp-namespace.c
@@ -278,8 +278,8 @@ cp_search_static_and_baseclasses (const char *name,
/* If the scope is a function/method, then look up NESTED as a local
static variable. E.g., "print 'function()::static_var'". */
- if ((TYPE_CODE (scope_type) == TYPE_CODE_FUNC
- || TYPE_CODE (scope_type) == TYPE_CODE_METHOD)
+ if ((scope_type->code () == TYPE_CODE_FUNC
+ || scope_type->code () == TYPE_CODE_METHOD)
&& domain == VAR_DOMAIN)
return lookup_symbol (nested, SYMBOL_BLOCK_VALUE (scope_sym.symbol),
VAR_DOMAIN, NULL);
@@ -927,7 +927,7 @@ cp_lookup_nested_symbol (struct type *parent_type,
domain_name (domain));
}
- switch (TYPE_CODE (parent_type))
+ switch (parent_type->code ())
{
case TYPE_CODE_STRUCT:
case TYPE_CODE_NAMESPACE: