diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-06-08 15:25:53 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-06-08 15:26:01 -0400 |
commit | 3d967001ecd3b325fc39d7f53ebf7054d1ecd503 (patch) | |
tree | 49d06d14ea849b5a58b207dc5e7e4303b3ae0b67 /gdb/eval.c | |
parent | 262abc0d67af006a709d0935940f9c9f5f7c5ee5 (diff) | |
download | gdb-3d967001ecd3b325fc39d7f53ebf7054d1ecd503.zip gdb-3d967001ecd3b325fc39d7f53ebf7054d1ecd503.tar.gz gdb-3d967001ecd3b325fc39d7f53ebf7054d1ecd503.tar.bz2 |
gdb: remove TYPE_INDEX_TYPE macro
Remove `TYPE_INDEX_TYPE` macro, changing all the call sites to use
`type::index_type` directly.
gdb/ChangeLog:
* gdbtypes.h (TYPE_INDEX_TYPE): Remove. Change all call sites
to use type::index_type instead.
Change-Id: I56715df0bdec89463cda6bd341dac0e01b2faf84
Diffstat (limited to 'gdb/eval.c')
-rw-r--r-- | gdb/eval.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -377,7 +377,7 @@ value_f90_subarray (struct value *array, { int pc = (*pos) + 1; LONGEST low_bound, high_bound; - struct type *range = check_typedef (TYPE_INDEX_TYPE (value_type (array))); + struct type *range = check_typedef (value_type (array)->index_type ()); enum range_type range_type = (enum range_type) longest_to_int (exp->elts[pc].longconst); @@ -1459,7 +1459,7 @@ evaluate_subexp_standard (struct type *expect_type, if (expect_type != NULL_TYPE && noside != EVAL_SKIP && type->code () == TYPE_CODE_ARRAY) { - struct type *range_type = TYPE_INDEX_TYPE (type); + struct type *range_type = type->index_type (); struct type *element_type = TYPE_TARGET_TYPE (type); struct value *array = allocate_value (expect_type); int element_size = TYPE_LENGTH (check_typedef (element_type)); @@ -1509,7 +1509,7 @@ evaluate_subexp_standard (struct type *expect_type, { struct value *set = allocate_value (expect_type); gdb_byte *valaddr = value_contents_raw (set); - struct type *element_type = TYPE_INDEX_TYPE (type); + struct type *element_type = type->index_type (); struct type *check_type = element_type; LONGEST low_bound, high_bound; @@ -3212,8 +3212,8 @@ evaluate_subexp_for_sizeof (struct expression *exp, int *pos, val = evaluate_subexp (NULL_TYPE, exp, pos, EVAL_NORMAL); type = value_type (val); if (type->code () == TYPE_CODE_ARRAY - && is_dynamic_type (TYPE_INDEX_TYPE (type)) - && TYPE_HIGH_BOUND_UNDEFINED (TYPE_INDEX_TYPE (type))) + && is_dynamic_type (type->index_type ()) + && TYPE_HIGH_BOUND_UNDEFINED (type->index_type ())) return allocate_optimized_out_value (size_type); } else @@ -3253,7 +3253,7 @@ evaluate_subexp_for_sizeof (struct expression *exp, int *pos, type = check_typedef (TYPE_TARGET_TYPE (type)); if (type->code () == TYPE_CODE_ARRAY) { - type = TYPE_INDEX_TYPE (type); + type = type->index_type (); /* Only re-evaluate the right hand side if the resulting type is a variable length type. */ if (TYPE_RANGE_DATA (type)->flag_bound_evaluated) |