C++-ify parser_state
authorTom Tromey <tom@tromey.com>
Thu, 23 Nov 2017 04:45:53 +0000 (21:45 -0700)
committerTom Tromey <tom@tromey.com>
Sun, 31 Dec 2017 00:05:37 +0000 (17:05 -0700)
commite9d9f57e11db6427db347bc5b9b100071355e63f
treeb431b37b9a20e1a406b30be36aee0f36489ef5ec
parenta594729cfb10457e0046359d2dde0c28b4185449
C++-ify parser_state

This mildly C++-ifies parser_state and stap_parse_info -- just enough
to remove some cleanups.

This version includes the changes implemented by Simon.

Regression tested by the buildbot.

gdb/ChangeLog
2017-12-30  Tom Tromey  <tom@tromey.com>
    Simon Marchi  <simon.marchi@ericsson.com>

* stap-probe.h (struct stap_parse_info): Add constructor,
destructor.
* stap-probe.c (stap_parse_argument): Update.
* rust-exp.y (rust_lex_tests): Update.
* parser-defs.h (struct parser_state): Add constructor,
destructor, release method.
<expout>: Change type to expression_up.
(null_post_parser): Change type.
(initialize_expout, reallocate_expout): Remove.
* parse.c (parser_state::parser_state): Rename from
initialize_expout.
(parser_state::release): Rename from reallocate_expout.
(write_exp_elt, parse_exp_in_context_1, increase_expout_size):
Update.
(null_post_parser): Change type of "exp".
* dtrace-probe.c (dtrace_probe::build_arg_exprs): Update.
* ada-lang.c (resolve, resolve_subexp)
(replace_operator_with_call): Change type of "expp".
* language.h (struct language_defn) <la_post_parser>: Change type
of "expp".
gdb/ChangeLog
gdb/ada-lang.c
gdb/dtrace-probe.c
gdb/language.h
gdb/parse.c
gdb/parser-defs.h
gdb/rust-exp.y
gdb/stap-probe.c
gdb/stap-probe.h