From 3d967001ecd3b325fc39d7f53ebf7054d1ecd503 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 8 Jun 2020 15:25:53 -0400 Subject: 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 --- gdb/eval.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gdb/eval.c') diff --git a/gdb/eval.c b/gdb/eval.c index 20533ab..6759d22 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -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) -- cgit v1.1