public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Move ~value body out-of-line
@ 2023-02-13 22:27 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2023-02-13 22:27 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e714001c7896d90413e2eee13acb56bdd9639abe

commit e714001c7896d90413e2eee13acb56bdd9639abe
Author: Tom Tromey <tom@tromey.com>
Date:   Tue Jan 31 07:41:09 2023 -0700

    Move ~value body out-of-line
    
    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>

Diff:
---
 gdb/value.c | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/gdb/value.c b/gdb/value.c
index 7606fa2666f..be981b1d3a0 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -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 *

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-13 22:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-13 22:27 [binutils-gdb] Move ~value body out-of-line Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).