]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Move ~value body out-of-line
authorTom Tromey <tom@tromey.com>
Tue, 31 Jan 2023 14:41:09 +0000 (07:41 -0700)
committerTom Tromey <tom@tromey.com>
Mon, 13 Feb 2023 22:21:06 +0000 (15:21 -0700)
struct value is going to move to value.h, but to avoid having
excessive code there, first move the destructor body out-of-line.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
gdb/value.c

index 7606fa2666f1b20b219c5dd2df08053eefe73459..be981b1d3a0c1763afac0e72d6fecf2b3d144c47 100644 (file)
@@ -191,18 +191,7 @@ struct value
   {
   }
 
-  ~value ()
-  {
-    if (VALUE_LVAL (this) == lval_computed)
-      {
-       const struct lval_funcs *funcs = m_location.computed.funcs;
-
-       if (funcs->free_closure)
-         funcs->free_closure (this);
-      }
-    else if (VALUE_LVAL (this) == lval_xcallable)
-      delete m_location.xm_worker;
-  }
+  ~value ();
 
   DISABLE_COPY_AND_ASSIGN (value);
 
@@ -383,6 +372,19 @@ struct value
   ULONGEST m_limited_length = 0;
 };
 
+value::~value ()
+{
+  if (VALUE_LVAL (this) == lval_computed)
+    {
+      const struct lval_funcs *funcs = m_location.computed.funcs;
+
+      if (funcs->free_closure)
+       funcs->free_closure (this);
+    }
+  else if (VALUE_LVAL (this) == lval_xcallable)
+    delete m_location.xm_worker;
+}
+
 /* See value.h.  */
 
 struct gdbarch *