aboutsummaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2021-08-30 11:49:49 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2021-09-30 22:05:57 -0400
commit33d16dd987d16fe1eb289853e5a444192bb31d9e (patch)
tree06c5ec20fad9309ab4dace3b6c659fa518d272af /gdb/valops.c
parentd3fd12dfc52cf4cbb910830e3ff60dca111f7468 (diff)
downloadgdb-33d16dd987d16fe1eb289853e5a444192bb31d9e.zip
gdb-33d16dd987d16fe1eb289853e5a444192bb31d9e.tar.gz
gdb-33d16dd987d16fe1eb289853e5a444192bb31d9e.tar.bz2
gdb: remove TYPE_FIELD_NAME and FIELD_NAME macros
Remove the `TYPE_FIELD_NAME` and `FIELD_NAME` macros, changing all the call sites to use field::name directly. Change-Id: I6900ae4e1ffab1396e24fb3298e94bf123826ca6
Diffstat (limited to 'gdb/valops.c')
-rw-r--r--gdb/valops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/valops.c b/gdb/valops.c
index 6729860..a6c3632 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -1993,7 +1993,7 @@ struct_field_searcher::search (struct value *arg1, LONGEST offset,
if (!m_looking_for_baseclass)
for (i = type->num_fields () - 1; i >= nbases; i--)
{
- const char *t_field_name = TYPE_FIELD_NAME (type, i);
+ const char *t_field_name = type->field (i).name ();
if (t_field_name && (strcmp_iw (t_field_name, m_name) == 0))
{
@@ -3337,7 +3337,7 @@ enum_constant_from_type (struct type *type, const char *name)
for (i = TYPE_N_BASECLASSES (type); i < type->num_fields (); ++i)
{
- const char *fname = TYPE_FIELD_NAME (type, i);
+ const char *fname = type->field (i).name ();
int len;
if (TYPE_FIELD_LOC_KIND (type, i) != FIELD_LOC_KIND_ENUMVAL
@@ -3509,7 +3509,7 @@ value_struct_elt_for_reference (struct type *domain, int offset,
for (i = t->num_fields () - 1; i >= TYPE_N_BASECLASSES (t); i--)
{
- const char *t_field_name = TYPE_FIELD_NAME (t, i);
+ const char *t_field_name = t->field (i).name ();
if (t_field_name && strcmp (t_field_name, name) == 0)
{