aboutsummaryrefslogtreecommitdiff
path: root/gdb/compile
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2020-06-01 11:07:52 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2020-06-17 09:25:09 +0100
commit9a49ad8c522a1ce83645d477bf6ced574c3bf651 (patch)
treed7094bdb142f991e9147938c8ea7553b62fcab49 /gdb/compile
parenteff93b4d48eb0e79b7879475bb47eec55dbb41be (diff)
downloadgdb-9a49ad8c522a1ce83645d477bf6ced574c3bf651.zip
gdb-9a49ad8c522a1ce83645d477bf6ced574c3bf651.tar.gz
gdb-9a49ad8c522a1ce83645d477bf6ced574c3bf651.tar.bz2
gdb: Convert language la_compute_program field to a method
This commit changes the language_data::la_compute_program 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 (ada_language_data): Delete la_compute_program initializer. * c-lang.c (c_language_data): Likewise. (c_language::compute_program): New member function. (cplus_language_data): Delete la_compute_program initializer. (cplus_language::compute_program): New member function. (asm_language_data): Delete la_compute_program initializer. (minimal_language_data): Likewise. * c-lang.h (c_compute_program): Update comment. (cplus_compute_program): Likewise. * compile/compile-c-support.c (c_compute_program): Likewise. (cplus_compute_program): Likewise. * compile/compile.c (compile_to_object): Update call to la_compute_program. * d-lang.c (d_language_data): Delete la_compute_program initializer. * 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_compute_program field. (language_defn::compute_program): New member function. * m2-lang.c (m2_language_data): Delete la_compute_program initializer. * objc-lang.c (objc_language_data): Likewise. * opencl-lang.c (opencl_language_data): Likewise. * p-lang.c (pascal_language_data): Likewise. * rust-lang.c (rust_language_data): Likewise.
Diffstat (limited to 'gdb/compile')
-rw-r--r--gdb/compile/compile-c-support.c4
-rw-r--r--gdb/compile/compile.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/gdb/compile/compile-c-support.c b/gdb/compile/compile-c-support.c
index 8499300..5e4da67 100644
--- a/gdb/compile/compile-c-support.c
+++ b/gdb/compile/compile-c-support.c
@@ -660,7 +660,7 @@ typedef compile_program<compile_cplus_instance,
cplus_add_code_header, c_add_code_footer,
cplus_add_input> cplus_compile_program;
-/* The la_compute_program method for C. */
+/* The compute_program method for C. */
std::string
c_compute_program (compile_instance *inst,
@@ -675,7 +675,7 @@ c_compute_program (compile_instance *inst,
return program.compute (input, expr_block, expr_pc);
}
-/* The la_compute_program method for C++. */
+/* The compute_program method for C++. */
std::string
cplus_compute_program (compile_instance *inst,
diff --git a/gdb/compile/compile.c b/gdb/compile/compile.c
index 3a3afa8..0c29a04 100644
--- a/gdb/compile/compile.c
+++ b/gdb/compile/compile.c
@@ -724,8 +724,8 @@ compile_to_object (struct command_line *cmd, const char *cmd_string,
error (_("Neither a simple expression, or a multi-line specified."));
std::string code
- = current_language->la_compute_program (compiler.get (), input, gdbarch,
- expr_block, expr_pc);
+ = current_language->compute_program (compiler.get (), input, gdbarch,
+ expr_block, expr_pc);
if (compile_debug)
fprintf_unfiltered (gdb_stdlog, "debug output:\n\n%s", code.c_str ());