From: Tom Tromey Date: Mon, 8 Mar 2021 14:27:57 +0000 (-0700) Subject: Inline expression constructor X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b9d06571f9d1c39edb0d3e976ff78586d7c436b0;p=binutils-gdb.git Inline expression constructor The struct expression constructor no longer does any real work, so this inlines it. The default destructor can also be used now as well. gdb/ChangeLog 2021-03-08 Tom Tromey * parse.c (expression::expression, expression::~expression): Remove. * expression.h (struct expression): Inline constructor. Remove destructor. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 97f029f402c..e2f6368af4d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2021-03-08 Tom Tromey + + * parse.c (expression::expression, expression::~expression): + Remove. + * expression.h (struct expression): Inline constructor. Remove + destructor. + 2021-03-08 Tom Tromey * std-operator.def (BINOP_END): Remove. diff --git a/gdb/expression.h b/gdb/expression.h index eae986af747..5c5371e9660 100644 --- a/gdb/expression.h +++ b/gdb/expression.h @@ -196,8 +196,12 @@ make_operation (Arg... args) struct expression { - expression (const struct language_defn *, struct gdbarch *); - ~expression (); + expression (const struct language_defn *lang, struct gdbarch *arch) + : language_defn (lang), + gdbarch (arch) + { + } + DISABLE_COPY_AND_ASSIGN (expression); /* Return the opcode for the outermost sub-expression of this diff --git a/gdb/parse.c b/gdb/parse.c index 96dd5dbf7a0..d068c94dfcd 100644 --- a/gdb/parse.c +++ b/gdb/parse.c @@ -105,16 +105,6 @@ expr_builder::release () return std::move (expout); } -expression::expression (const struct language_defn *lang, struct gdbarch *arch) - : language_defn (lang), - gdbarch (arch) -{ -} - -expression::~expression () -{ -} - /* Return the type of MSYMBOL, a minimal symbol of OBJFILE. If ADDRESS_P is not NULL, set it to the MSYMBOL's resolved address. */