From: Tom Tromey Date: Mon, 8 Mar 2021 14:27:57 +0000 (-0700) Subject: Remove two Ada opcodes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0922dc847e90e6ab53acd2ef7725103e027126b9;p=binutils-gdb.git Remove two Ada opcodes The OP_ATR_MIN and OP_ATR_MAX constants aren't truly needed. Internally, they are converted to BINOP_MIN and BINOP_MAX. This patch removes them in favor of simple reuse. gdb/ChangeLog 2021-03-08 Tom Tromey * std-operator.def (OP_ATR_MIN, OP_ATR_MAX): Remove. * ada-lang.c (ada_binop_minmax): Update. * ada-exp.h (ada_binop_min_operation, ada_binop_max_operation): Use BINOP_MIN and BINOP_MAX. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c9328defa92..541bd5f8191 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2021-03-08 Tom Tromey + + * std-operator.def (OP_ATR_MIN, OP_ATR_MAX): Remove. + * ada-lang.c (ada_binop_minmax): Update. + * ada-exp.h (ada_binop_min_operation, ada_binop_max_operation): + Use BINOP_MIN and BINOP_MAX. + 2021-03-08 Tom Tromey * value.h (evaluate_subexp_with_coercion): Don't declare. diff --git a/gdb/ada-exp.h b/gdb/ada-exp.h index 1ae0cbc3546..0b6f1f22e79 100644 --- a/gdb/ada-exp.h +++ b/gdb/ada-exp.h @@ -213,8 +213,8 @@ using ada_binop_div_operation = binop_operation; using ada_binop_rem_operation = binop_operation; using ada_binop_mod_operation = binop_operation; -using ada_binop_min_operation = binop_operation; -using ada_binop_max_operation = binop_operation; +using ada_binop_min_operation = binop_operation; +using ada_binop_max_operation = binop_operation; using ada_binop_exp_operation = binop_operation; diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index db7eba377cf..926e8c78557 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -10096,8 +10096,7 @@ ada_binop_minmax (struct type *expect_type, else { binop_promote (exp->language_defn, exp->gdbarch, &arg1, &arg2); - return value_binop (arg1, arg2, - op == OP_ATR_MIN ? BINOP_MIN : BINOP_MAX); + return value_binop (arg1, arg2, op); } } diff --git a/gdb/std-operator.def b/gdb/std-operator.def index 99b5d90381a..c1d30918e0a 100644 --- a/gdb/std-operator.def +++ b/gdb/std-operator.def @@ -359,8 +359,6 @@ OP (OP_ATR_FIRST) OP (OP_ATR_LAST) OP (OP_ATR_LENGTH) OP (OP_ATR_IMAGE) -OP (OP_ATR_MAX) -OP (OP_ATR_MIN) OP (OP_ATR_MODULUS) OP (OP_ATR_POS) OP (OP_ATR_SIZE)