From 1bf9c36374d9c758bc49dc18dca7acf0719e290d Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Tue, 2 Jun 2020 14:57:40 +0100 Subject: gdb: Convert language la_post_parser field to a method This commit changes the language_data::la_post_parser function pointer member variable into a member function of language_defn. There should be no user visible changes after this commit. gdb/ChangeLog: * ada-lang.c (resolve): Rename to ada_language::post_parser. (ada_language_data): Delete la_post_parser initializer. (ada_language::post_parser): New member function. * c-lang.c (c_language_data): Delete la_post_parser initializer. (cplus_language_data): Likewise. (asm_language_data): Likewise. (minimal_language_data): Likewise. * d-lang.c (d_language_data): Likewise. * f-lang.c (f_language_data): Likewise. * go-lang.c (go_language_data): Likewise. * language.c (unknown_language_data): Likewise. (auto_language_data): Likewise. * language.h (language_data): Delete la_post_parser field. (language_defn::post_parser): New member function. * m2-lang.c (m2_language_data): Delete la_post_parser initializer. * objc-lang.c (objc_language_data): Likewise. * opencl-lang.c (opencl_language_data): Likewise. * p-lang.c (pascal_language_data): Likewise. * parse.c (parse_exp_in_context): Update call to post_parser. (null_post_parser): Delete definition. * parser-defs.h (null_post_parser): Delete declaration. * rust-lang.c (rust_language_data): Delete la_post_parser initializer. --- gdb/parse.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'gdb/parse.c') diff --git a/gdb/parse.c b/gdb/parse.c index f003a30..2fb474e 100644 --- a/gdb/parse.c +++ b/gdb/parse.c @@ -1146,8 +1146,7 @@ parse_exp_in_context (const char **stringptr, CORE_ADDR pc, if (out_subexp) *out_subexp = subexp; - lang->la_post_parser (&result, void_context_p, ps.parse_completion, - tracker); + lang->post_parser (&result, void_context_p, ps.parse_completion, tracker); if (expressiondebug) dump_prefix_expression (result.get (), gdb_stdlog); @@ -1241,14 +1240,6 @@ parse_expression_for_completion (const char *string, return value_type (val); } -/* A post-parser that does nothing. */ - -void -null_post_parser (expression_up *exp, int void_context_p, int completin, - innermost_block_tracker *tracker) -{ -} - /* Parse floating point value P of length LEN. Return false if invalid, true if valid. The successfully parsed number is stored in DATA in -- cgit v1.1