Introduce ada_binop_exp_operation
authorTom Tromey <tom@tromey.com>
Mon, 8 Mar 2021 14:27:57 +0000 (07:27 -0700)
committerTom Tromey <tom@tromey.com>
Mon, 8 Mar 2021 14:28:35 +0000 (07:28 -0700)
This adds class ada_binop_exp_operation, which implements BINOP_EXP
for Ada.

gdb/ChangeLog
2021-03-08  Tom Tromey  <tom@tromey.com>

* ada-lang.c (ada_binop_exp): No longer static.
* ada-exp.h (ada_binop_exp_operation): New typedef.

gdb/ChangeLog
gdb/ada-exp.h
gdb/ada-lang.c

index c49a9db1aa20e789bc771fa3a6cd37c3e8167e48..95659b4818ae2ae1df2dfd005f6296de3e933f77 100644 (file)
@@ -1,3 +1,8 @@
+2021-03-08  Tom Tromey  <tom@tromey.com>
+
+       * ada-lang.c (ada_binop_exp): No longer static.
+       * ada-exp.h (ada_binop_exp_operation): New typedef.
+
 2021-03-08  Tom Tromey  <tom@tromey.com>
 
        * ada-lang.c (ada_val_atr): No longer static.
index c86b05489478a37f53badd2b00bfbd44485054d1..8e908464f1f7b892c746478ea3d099cef31ca807 100644 (file)
@@ -71,7 +71,10 @@ extern struct value *ada_pos_atr (struct type *expect_type,
                                  struct value *arg);
 extern struct value *ada_val_atr (enum noside noside, struct type *type,
                                  struct value *arg);
-
+extern struct value *ada_binop_exp (struct type *expect_type,
+                                   struct expression *exp,
+                                   enum noside noside, enum exp_opcode op,
+                                   struct value *arg1, struct value *arg2);
 
 namespace expr
 {
@@ -189,6 +192,8 @@ using ada_binop_mod_operation = binop_operation<BINOP_MOD, ada_mult_binop>;
 using ada_binop_min_operation = binop_operation<OP_ATR_MIN, ada_binop_minmax>;
 using ada_binop_max_operation = binop_operation<OP_ATR_MAX, ada_binop_minmax>;
 
+using ada_binop_exp_operation = binop_operation<BINOP_EXP, ada_binop_exp>;
+
 /* Implement the equal and not-equal operations for Ada.  */
 class ada_binop_equal_operation
   : public tuple_holding_operation<enum exp_opcode, operation_up, operation_up>
index c689c7fec8b67fafaa32eb18aa92eac47285d270..8a4de779aa680c24e604057f6e0dfe7ea6aa2894 100644 (file)
@@ -10416,7 +10416,7 @@ ada_binop_minmax (struct type *expect_type,
 
 /* A helper function for BINOP_EXP.  */
 
-static struct value *
+struct value *
 ada_binop_exp (struct type *expect_type,
               struct expression *exp,
               enum noside noside, enum exp_opcode op,