diff options
author | Tom Tromey <tom@tromey.com> | 2023-01-31 07:41:09 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-02-13 15:21:06 -0700 |
commit | e714001c7896d90413e2eee13acb56bdd9639abe (patch) | |
tree | 760383a9c8b3431ff94888885509b224bf251b92 | |
parent | 382d927ffc1224d7fdac532cf826b1322eba91ee (diff) | |
download | gdb-e714001c7896d90413e2eee13acb56bdd9639abe.zip gdb-e714001c7896d90413e2eee13acb56bdd9639abe.tar.gz gdb-e714001c7896d90413e2eee13acb56bdd9639abe.tar.bz2 |
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>
-rw-r--r-- | gdb/value.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/gdb/value.c b/gdb/value.c index 7606fa2..be981b1 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 * |