aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.c
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2020-06-02 14:48:04 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2020-06-23 13:34:10 +0100
commit87afa6523b01cd6bdcc3903fe22953966cec7bb7 (patch)
treef97b950d1ff8b582383dad54e51e7bd65280ff7d /gdb/ada-lang.c
parent3084d7a27b8e4d13f0fdd0fac62ffadc9c2223b5 (diff)
downloadgdb-87afa6523b01cd6bdcc3903fe22953966cec7bb7.zip
gdb-87afa6523b01cd6bdcc3903fe22953966cec7bb7.tar.gz
gdb-87afa6523b01cd6bdcc3903fe22953966cec7bb7.tar.bz2
gdb: Convert language la_parser field to a method
This commit changes the language_data::la_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 (parse): Rename to ada_language::parser. (ada_language_data): Delete la_parser initializer. (ada_language::parser): New member function, implementation from parse. * c-lang.c (c_language_data): Delete la_parser initializer. (cplus_language_data): Likewise. (asm_language_data): Likewise. (minimal_language_data): Likewise. * d-lang.c (d_language_data): Likewise. (d_language::parser): New member function. * f-lang.c (f_language_data): Delete la_parser initializer. (f_language::parser): New member function. * go-lang.c (go_language_data): Delete la_parser initializer. (go_language::parser): New member function. * language.c (unk_lang_parser): Delete. (language_defn::parser): Define new member function. (unknown_language_data): Delete la_parser initializer. (unknown_language::parser): New member function. (auto_language_data): Delete la_parser initializer. (auto_language::parser): New member function. * language.h (language_data): Delete la_parser field. (language_defn::parser): Declare new member function. * m2-lang.c (m2_language_data): Delete la_parser initializer. (m2_language::parser): New member function. * objc-lang.c (objc_language_data): Delete la_parser initializer. * opencl-lang.c (opencl_language_data): Likewise. * p-lang.c (pascal_language_data): Likewise. (pascal_language::parser): New member function. * parse.c (parse_exp_in_context): Update call to parser. * rust-lang.c (rust_language_data): Delete la_parser initializer. (rust_language::parser): New member function.
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r--gdb/ada-lang.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index d303915..c4ee79e 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -13534,13 +13534,6 @@ emit_char (int c, struct type *type, struct ui_file *stream, int quoter)
ada_emit_char (c, type, stream, quoter, 1);
}
-static int
-parse (struct parser_state *ps)
-{
- warnings_issued = 0;
- return ada_parse (ps);
-}
-
static const struct exp_descriptor ada_exp_descriptor = {
ada_print_subexp,
ada_operator_length,
@@ -13718,7 +13711,6 @@ extern const struct language_data ada_language_data =
macro_expansion_no,
ada_extensions,
&ada_exp_descriptor,
- parse,
resolve,
ada_printchar, /* Print a character constant */
ada_printstr, /* Function to print string constant */
@@ -14116,6 +14108,14 @@ public:
return {};
}
+ /* See language.h. */
+
+ int parser (struct parser_state *ps) const override
+ {
+ warnings_issued = 0;
+ return ada_parse (ps);
+ }
+
protected:
/* See language.h. */