mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-11 13:02:10 +08:00
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>
This commit is contained in:
parent
382d927ffc
commit
e714001c78
26
gdb/value.c
26
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 *
|
||||
|
Loading…
Reference in New Issue
Block a user