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:
parent
2f1b18db86
commit
f2d8e4c597
7 changed files with 46 additions and 27 deletions
|
@ -774,7 +774,7 @@ operator_length_standard (const struct expression *expr, int endpos,
|
|||
{
|
||||
int oplen = 1;
|
||||
int args = 0;
|
||||
enum range_type range_type;
|
||||
enum range_flag range_flag;
|
||||
int i;
|
||||
|
||||
if (endpos < 1)
|
||||
|
@ -918,15 +918,15 @@ operator_length_standard (const struct expression *expr, int endpos,
|
|||
|
||||
case OP_RANGE:
|
||||
oplen = 3;
|
||||
range_type = (enum range_type)
|
||||
range_flag = (enum range_flag)
|
||||
longest_to_int (expr->elts[endpos - 2].longconst);
|
||||
|
||||
/* Assume the range has 2 arguments (low bound and high bound), then
|
||||
reduce the argument count if any bounds are set to default. */
|
||||
args = 2;
|
||||
if (range_type & RANGE_LOW_BOUND_DEFAULT)
|
||||
if (range_flag & RANGE_LOW_BOUND_DEFAULT)
|
||||
--args;
|
||||
if (range_type & RANGE_HIGH_BOUND_DEFAULT)
|
||||
if (range_flag & RANGE_HIGH_BOUND_DEFAULT)
|
||||
--args;
|
||||
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue