gdb: Move la_language into the language_defn class

Move the language_data::la_language member variable into the
langage_defn class.

I have not made the la_language member variable a method of
langage_defn simply because of the large number of places that
la_language is referenced throughout GDB.  I have made the new member
variable constant though, so this should prevent accidental
assignment.

In the future we might consider converting la_language to a method,
but right now my goal is to remove the langage_data class, so I'm
happy to leave la_language as a constant member variable.

There should be no user visible changes after this commit.

gdb/ChangeLog:

	* ada-lang.c (ada_language_data): Remove la_language initializer.
	* c-lang.c (c_language_data): Likewise.
	(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): Remove la_language field.
	(language_defn::language_defn): Initialise la_language field.
	(language_defn::la_language): New member variable.
	* m2-lang.c (m2_language_data): Remove la_language field.
	* 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.
This commit is contained in:
Andrew Burgess 2020-07-03 18:51:34 +01:00
parent e171d6f15e
commit 85967615df
13 changed files with 27 additions and 20 deletions

View file

@ -875,7 +875,6 @@ const struct exp_descriptor exp_descriptor_c =
extern const struct language_data c_language_data =
{
language_c,
range_check_off,
case_sensitive_on,
array_row_major,
@ -984,7 +983,6 @@ enum cplus_primitive_types {
extern const struct language_data cplus_language_data =
{
language_cplus,
range_check_off,
case_sensitive_on,
array_row_major,
@ -1196,7 +1194,6 @@ static cplus_language cplus_language_defn;
extern const struct language_data asm_language_data =
{
language_asm,
range_check_off,
case_sensitive_on,
array_row_major,
@ -1266,7 +1263,6 @@ static asm_language asm_language_defn;
extern const struct language_data minimal_language_data =
{
language_minimal,
range_check_off,
case_sensitive_on,
array_row_major,