gdb: rename 'enum range_type' to 'enum range_flag'

To avoid confusion with other parts of GDB relating to types and
ranges, rename this enum to make it clearer that it is a set of
individual flags rather than an enumeration of different types of
range.

There should be no user visible changes after this commit.

gdb/ChangeLog:

	* expprint.c (print_subexp_standard): Change enum range_type to
	range_flag and rename variables to match.
	(dump_subexp_body_standard): Likewise.
	* expression.h (enum range_type): Rename to...
	(enum range_flag): ...this.
	(range_types): Rename to...
	(range_flags): ...this.
	* f-lang.c (value_f90_subarray): Change enum range_type to
	range_flag and rename variables to match.
	* parse.c (operator_length_standard): Likewise.
	* rust-exp.y (rust_parser::convert_ast_to_expression): Change enum
	range_type to range_flag.
	* rust-lang.c (rust_evaluate_funcall): Likewise.
	(rust_range): Likewise.
	(rust_compute_range): Likewise.
	(rust_subscript): Likewise.
This commit is contained in:
Andrew Burgess 2020-09-26 00:09:25 +01:00
parent 2f1b18db86
commit f2d8e4c597
7 changed files with 46 additions and 27 deletions

View file

@ -1065,7 +1065,6 @@ rust_evaluate_funcall (struct expression *exp, int *pos, enum noside noside)
static struct value *
rust_range (struct expression *exp, int *pos, enum noside noside)
{
enum range_type kind;
struct value *low = NULL, *high = NULL;
struct value *addrval, *result;
CORE_ADDR addr;
@ -1074,7 +1073,8 @@ rust_range (struct expression *exp, int *pos, enum noside noside)
struct type *temp_type;
const char *name;
kind = (enum range_type) longest_to_int (exp->elts[*pos + 1].longconst);
auto kind
= (enum range_flag) longest_to_int (exp->elts[*pos + 1].longconst);
*pos += 3;
if (!(kind & RANGE_LOW_BOUND_DEFAULT))
@ -1164,7 +1164,7 @@ rust_range (struct expression *exp, int *pos, enum noside noside)
static void
rust_compute_range (struct type *type, struct value *range,
LONGEST *low, LONGEST *high,
range_types *kind)
range_flags *kind)
{
int i;
@ -1204,7 +1204,7 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside,
struct type *rhstype;
LONGEST low, high_bound;
/* Initialized to appease the compiler. */
range_types kind = RANGE_LOW_BOUND_DEFAULT | RANGE_HIGH_BOUND_DEFAULT;
range_flags kind = RANGE_LOW_BOUND_DEFAULT | RANGE_HIGH_BOUND_DEFAULT;
LONGEST high = 0;
int want_slice = 0;