Move enum noside earlier in expression.h
authorTom Tromey <tom@tromey.com>
Sat, 21 Nov 2020 15:49:10 +0000 (08:49 -0700)
committerTom Tromey <tom@tromey.com>
Mon, 21 Dec 2020 19:55:53 +0000 (12:55 -0700)
For the expression rewrite series, I needed to move enum noside
earlier in expression.h.  Because this is a pure move, and because it
seems harmless and uncontroversial to move an enum definition earlier
in a file, I'm pushing it in early, to reduce the size of that series.

Tested by rebuilding.

gdb/ChangeLog
2020-12-21  Tom Tromey  <tom@tromey.com>

* expression.h (enum noside): Move earlier.

gdb/ChangeLog
gdb/expression.h

index a3aabb506826159ec3a1b1eae30de47aa9e2c1d9..142278a34990e8dcac885962cd73a874a913e085 100644 (file)
@@ -1,3 +1,7 @@
+2020-12-21  Tom Tromey  <tom@tromey.com>
+
+       * expression.h (enum noside): Move earlier.
+
 2020-12-21  Peter Waller  <p@pwaller.net>
 
        * interps.c (interpreter_exec_cmd): Restore streams pointers.
index c07111c316f64bd158f15a3cd9658882d9132438..f30c79309ae97e0bac4dd704ecb0eec5a6ace281 100644 (file)
@@ -67,6 +67,28 @@ enum exp_opcode : uint8_t
     OP_UNUSED_LAST
   };
 
+/* Values of NOSIDE argument to eval_subexp.  */
+
+enum noside
+  {
+    EVAL_NORMAL,
+    EVAL_SKIP,                 /* Only effect is to increment pos.
+                                  Return type information where
+                                  possible.  */
+    EVAL_AVOID_SIDE_EFFECTS    /* Don't modify any variables or
+                                  call any functions.  The value
+                                  returned will have the correct
+                                  type, and will have an
+                                  approximately correct lvalue
+                                  type (inaccuracy: anything that is
+                                  listed as being in a register in
+                                  the function in which it was
+                                  declared will be lval_register).
+                                  Ideally this would not even read
+                                  target memory, but currently it
+                                  does in many situations.  */
+  };
+
 union exp_element
   {
     enum exp_opcode opcode;
@@ -135,28 +157,6 @@ extern expression_up parse_exp_1 (const char **, CORE_ADDR pc,
 
 /* From eval.c */
 
-/* Values of NOSIDE argument to eval_subexp.  */
-
-enum noside
-  {
-    EVAL_NORMAL,
-    EVAL_SKIP,                 /* Only effect is to increment pos.
-                                  Return type information where
-                                  possible.  */
-    EVAL_AVOID_SIDE_EFFECTS    /* Don't modify any variables or
-                                  call any functions.  The value
-                                  returned will have the correct
-                                  type, and will have an
-                                  approximately correct lvalue
-                                  type (inaccuracy: anything that is
-                                  listed as being in a register in
-                                  the function in which it was
-                                  declared will be lval_register).
-                                  Ideally this would not even read
-                                  target memory, but currently it
-                                  does in many situations.  */
-  };
-
 extern struct value *evaluate_subexp_standard
   (struct type *, struct expression *, int *, enum noside);