aboutsummaryrefslogtreecommitdiff
path: root/gdb/parser-defs.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-03-08 07:27:57 -0700
committerTom Tromey <tom@tromey.com>2021-03-08 07:28:43 -0700
commitce284361a2b8c928df94acdb9afd005242140bb1 (patch)
tree9132adb8f531b9ebf4aed26fe24904797f962741 /gdb/parser-defs.h
parentb9d06571f9d1c39edb0d3e976ff78586d7c436b0 (diff)
downloadgdb-ce284361a2b8c928df94acdb9afd005242140bb1.zip
gdb-ce284361a2b8c928df94acdb9afd005242140bb1.tar.gz
gdb-ce284361a2b8c928df94acdb9afd005242140bb1.tar.bz2
Inline expr_builder methods
This inlines the expr_builder constructor and release method. These are straightforward, so this seemed simpler. gdb/ChangeLog 2021-03-08 Tom Tromey <tom@tromey.com> * parser-defs.h (struct expr_builder) <expr_builder>: Inline. <release>: Inline. * parse.c (expr_builder::expr_builder, expr_builder::release): Remove.
Diffstat (limited to 'gdb/parser-defs.h')
-rw-r--r--gdb/parser-defs.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h
index 3e81e0b..2276821 100644
--- a/gdb/parser-defs.h
+++ b/gdb/parser-defs.h
@@ -42,13 +42,19 @@ struct expr_builder
And GDBARCH is the gdbarch to use during parsing. */
expr_builder (const struct language_defn *lang,
- struct gdbarch *gdbarch);
+ struct gdbarch *gdbarch)
+ : expout (new expression (lang, gdbarch))
+ {
+ }
DISABLE_COPY_AND_ASSIGN (expr_builder);
/* Resize the allocated expression to the correct size, and return
it as an expression_up -- passing ownership to the caller. */
- ATTRIBUTE_UNUSED_RESULT expression_up release ();
+ ATTRIBUTE_UNUSED_RESULT expression_up release ()
+ {
+ return std::move (expout);
+ }
/* Return the gdbarch that was passed to the constructor. */