diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2021-09-26 16:38:02 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-10-29 16:44:45 -0400 |
commit | 970db5186051c051d9c5bd1f7ed404902b96fa80 (patch) | |
tree | ec3f149b291e22c532b6b61367fd9b2abcdff0e4 /gdb/ada-lang.c | |
parent | b610c04548a39dbce6d51c33d7a8125e59066939 (diff) | |
download | gdb-970db5186051c051d9c5bd1f7ed404902b96fa80.zip gdb-970db5186051c051d9c5bd1f7ed404902b96fa80.tar.gz gdb-970db5186051c051d9c5bd1f7ed404902b96fa80.tar.bz2 |
gdb: remove TYPE_FIELD_ENUMVAL
Remove TYPE_FIELD_ENUMVAL, replace with type::field +
field::loc_enumval.
Change-Id: I2ada73e4635aad3363ce2eb22c1dc52698ee2072
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r-- | gdb/ada-lang.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index c7837c7..d964dae 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -651,7 +651,7 @@ ada_discrete_type_high_bound (struct type *type) } } case TYPE_CODE_ENUM: - return TYPE_FIELD_ENUMVAL (type, type->num_fields () - 1); + return type->field (type->num_fields () - 1).loc_enumval (); case TYPE_CODE_BOOL: return 1; case TYPE_CODE_CHAR: @@ -686,7 +686,7 @@ ada_discrete_type_low_bound (struct type *type) } } case TYPE_CODE_ENUM: - return TYPE_FIELD_ENUMVAL (type, 0); + return type->field (0).loc_enumval (); case TYPE_CODE_BOOL: return 0; case TYPE_CODE_CHAR: @@ -4617,7 +4617,7 @@ ada_identical_enum_types_p (struct type *type1, struct type *type2) /* All enums in the type should have an identical underlying value. */ for (i = 0; i < type1->num_fields (); i++) - if (TYPE_FIELD_ENUMVAL (type1, i) != TYPE_FIELD_ENUMVAL (type2, i)) + if (type1->field (i).loc_enumval () != type2->field (i).loc_enumval ()) return 0; /* All enumerals should also have the same name (modulo any numerical @@ -8578,7 +8578,7 @@ val_atr (struct type *type, LONGEST val) { if (val < 0 || val >= type->num_fields ()) error (_("argument to 'VAL out of range")); - val = TYPE_FIELD_ENUMVAL (type, val); + val = type->field (val).loc_enumval (); } return value_from_longest (type, val); } @@ -10214,7 +10214,7 @@ convert_char_literal (struct type *type, LONGEST val) size_t elen = strlen (ename); if (elen >= len && strcmp (name, ename + elen - len) == 0) - return TYPE_FIELD_ENUMVAL (type, f); + return type->field (f).loc_enumval (); } return val; } |