summaryrefslogtreecommitdiff
path: root/gdb/varobj.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/varobj.c
parent67607e24d0413828acdfa9bc38f6fbac40b860b9 (diff)
downloadbinutils-gdb-7813437494ac39f3aef392d06ed5416e84fe386b.tar.gz
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/varobj.c')
-rw-r--r--gdb/varobj.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c
index 8a7b7108f89..3358be4e77b 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -1271,7 +1271,7 @@ install_new_value (struct varobj *var, struct value *value, bool initial)
if (value)
value = coerce_ref (value);
- if (var->type && TYPE_CODE (var->type) == TYPE_CODE_UNION)
+ if (var->type && var->type->code () == TYPE_CODE_UNION)
/* For unions, we need to fetch the value implicitly because
of implementation of union member fetch. When gdb
creates a value for a field and the value of the enclosing
@@ -2398,7 +2398,7 @@ varobj_editable_p (const struct varobj *var)
type = varobj_get_value_type (var);
- switch (TYPE_CODE (type))
+ switch (type->code ())
{
case TYPE_CODE_STRUCT:
case TYPE_CODE_UNION:
@@ -2445,7 +2445,7 @@ varobj_default_value_is_changeable_p (const struct varobj *var)
type = varobj_get_value_type (var);
- switch (TYPE_CODE (type))
+ switch (type->code ())
{
case TYPE_CODE_STRUCT:
case TYPE_CODE_UNION: