binutils-gdb/gdb/compile
Andrew Burgess 8e25bafe93 gdb: Convert language la_get_compile_instance field to a method
This commit changes the language_data::la_get_compile_instance
function pointer member variable into a member function of
language_defn.  Unlike previous commits converting fields of
language_data to member function in language_defn, this field is NULL
for some languages.  As a result I had to change the API slightly so
that the base language_defn class provides an implementation.

There should be no user visible changes after this commit.

gdb/ChangeLog:

	* ada-lang.c (ada_language_data): Delete la_get_compile_instance
	initializer.
	* c-lang.c (class compile_instance): Declare.
	(c_language_data): Delete la_get_compile_instance initializer.
	(c_language::get_compile_instance): New member function.
	(cplus_language_data): Delete la_get_compile_instance initializer.
	(cplus_language::get_compile_instance): New member function.
	(asm_language_data): Delete la_get_compile_instance initializer.
	(minimal_language_data): Likewise.
	* c-lang.h (c_get_compile_context): Update comment.
	(cplus_get_compile_context): Update comment.
	* compile/compile.c (compile_to_object): Update calls, don't rely
	on function pointer being NULL.
	* d-lang.c (d_language_data): Delete la_get_compile_instance
	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_get_compile_instance field.
	(language_defn::get_compile_instance): New member function.
	* m2-lang.c (m2_language_data): Delete la_get_compile_instance
	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.
2020-06-02 13:53:10 +01:00
..
compile-c-support.c gdb: remove TYPE_CODE macro 2020-05-14 13:46:38 -04:00
compile-c-symbols.c gdb: remove TYPE_FIELD macro 2020-05-23 17:39:54 -04:00
compile-c-types.c gdb: remove TYPE_NFIELDS macro 2020-05-22 16:55:15 -04:00
compile-c.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
compile-cplus-symbols.c gdb: remove TYPE_CODE macro 2020-05-14 13:46:38 -04:00
compile-cplus-types.c gdb: remove TYPE_FIELD macro 2020-05-23 17:39:54 -04:00
compile-cplus.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
compile-internal.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
compile-loc2c.c Remove dwarf2_per_cu_data::text_offset 2020-05-27 11:15:57 -04:00
compile-object-load.c gdb: remove TYPE_NFIELDS macro 2020-05-22 16:55:15 -04:00
compile-object-load.h Remove obsolete declaration 2020-05-22 13:35:13 -06:00
compile-object-run.c gdb: remove TYPE_NFIELDS macro 2020-05-22 16:55:15 -04:00
compile-object-run.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
compile.c gdb: Convert language la_get_compile_instance field to a method 2020-06-02 13:53:10 +01:00
compile.h Remove dwarf2_per_cu_data::text_offset 2020-05-27 11:15:57 -04:00
gcc-c-plugin.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00
gcc-cp-plugin.h Update copyright year range in all GDB files. 2020-01-01 10:20:53 +04:00