aboutsummaryrefslogtreecommitdiff
path: root/gdb/expprint.c
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2020-09-26 00:09:25 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2020-10-22 09:24:42 +0100
commitf2d8e4c59770975415585af20b3d4249ff57b36e (patch)
tree35ff51835d87fe51e123931e7efe2120eac85ad9 /gdb/expprint.c
parent2f1b18db863d630b94f9454067597e0df648bf37 (diff)
downloadgdb-f2d8e4c59770975415585af20b3d4249ff57b36e.zip
gdb-f2d8e4c59770975415585af20b3d4249ff57b36e.tar.gz
gdb-f2d8e4c59770975415585af20b3d4249ff57b36e.tar.bz2
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.
Diffstat (limited to 'gdb/expprint.c')
-rw-r--r--gdb/expprint.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/gdb/expprint.c b/gdb/expprint.c
index bdb69a9..2dee2bb 100644
--- a/gdb/expprint.c
+++ b/gdb/expprint.c
@@ -579,19 +579,19 @@ print_subexp_standard (struct expression *exp, int *pos,
case OP_RANGE:
{
- enum range_type range_type;
+ enum range_flag range_flag;
- range_type = (enum range_type)
+ range_flag = (enum range_flag)
longest_to_int (exp->elts[pc + 1].longconst);
*pos += 2;
- if (range_type & RANGE_HIGH_BOUND_EXCLUSIVE)
+ if (range_flag & RANGE_HIGH_BOUND_EXCLUSIVE)
fputs_filtered ("EXCLUSIVE_", stream);
fputs_filtered ("RANGE(", stream);
- if (!(range_type & RANGE_LOW_BOUND_DEFAULT))
+ if (!(range_flag & RANGE_LOW_BOUND_DEFAULT))
print_subexp (exp, pos, stream, PREC_ABOVE_COMMA);
fputs_filtered ("..", stream);
- if (!(range_type & RANGE_HIGH_BOUND_DEFAULT))
+ if (!(range_flag & RANGE_HIGH_BOUND_DEFAULT))
print_subexp (exp, pos, stream, PREC_ABOVE_COMMA);
fputs_filtered (")", stream);
return;
@@ -1106,25 +1106,25 @@ dump_subexp_body_standard (struct expression *exp,
break;
case OP_RANGE:
{
- enum range_type range_type;
+ enum range_flag range_flag;
- range_type = (enum range_type)
+ range_flag = (enum range_flag)
longest_to_int (exp->elts[elt].longconst);
elt += 2;
- if (range_type & RANGE_HIGH_BOUND_EXCLUSIVE)
+ if (range_flag & RANGE_HIGH_BOUND_EXCLUSIVE)
fputs_filtered ("Exclusive", stream);
fputs_filtered ("Range '", stream);
- if (!(range_type & RANGE_LOW_BOUND_DEFAULT))
+ if (!(range_flag & RANGE_LOW_BOUND_DEFAULT))
fputs_filtered ("EXP", stream);
fputs_filtered ("..", stream);
- if (!(range_type & RANGE_HIGH_BOUND_DEFAULT))
+ if (!(range_flag & RANGE_HIGH_BOUND_DEFAULT))
fputs_filtered ("EXP", stream);
fputs_filtered ("'", stream);
- if (!(range_type & RANGE_LOW_BOUND_DEFAULT))
+ if (!(range_flag & RANGE_LOW_BOUND_DEFAULT))
elt = dump_subexp (exp, stream, elt);
- if (!(range_type & RANGE_HIGH_BOUND_DEFAULT))
+ if (!(range_flag & RANGE_HIGH_BOUND_DEFAULT))
elt = dump_subexp (exp, stream, elt);
}
break;