gdb: Remove language_data struct
The language_data type, from which language_defn inherits, is now empty, and this commit removes it. Each language is updated to no longer create and use a language_data struct. There should be no user visible changes after this commit. gdb/ChangeLog: * ada-lang.c (ada_language_data): Delete. (ada_language): Remove references to ada_language_data. * c-lang.c (c_language_data): Delete. (c_language): Remove references to c_language_data. (cplus_language_data): Delete. (cplus_language): Remove references to cplus_language_data. (asm_language_data): Delete. (asm_language): Remove references to asm_language_data. (minimal_language_data): Delete. (minimal_language): Remove references to minimal_language_data. * d-lang.c (d_language_data): Delete. (d_language): Remove references to d_language_data. * f-lang.c (f_language_data): Delete. (f_language): Remove references to f_language_data. * go-lang.c (go_language_data): Delete. (go_language): Remove references to go_language_data. * language.c (unknown_language_data): Delete. (unknown_language): Remove references to unknown_language_data. (auto_language_data): Delete. (auto_language): Remove references to auto_language_data. * language.h (language_data): Delete struct. (language_defn): No longer inherit from language_data. * m2-lang.c (m2_language_data): Delete. (m2_language): Remove references to m2_language_data. * objc-lang.c (objc_language_data): Delete. (objc_language): Remove references to objc_language_data. * opencl-lang.c (opencl_language_data): Delete. (opencl_language): Remove references to opencl_language_data. * p-lang.c (pascal_language_data): Delete. (pascal_language): Remove references to pascal_language_data. * rust-lang.c (rust_language_data): Delete. (rust_language): Remove references to rust_language_data.
This commit is contained in:
parent
b7c6e27dbb
commit
0e25e76727
13 changed files with 56 additions and 129 deletions
|
@ -152,31 +152,12 @@ struct language_pass_by_ref_info
|
|||
/* Splitting strings into words. */
|
||||
extern const char *default_word_break_characters (void);
|
||||
|
||||
/* Structure tying together assorted information about a language.
|
||||
|
||||
As we move over from the old structure based languages to a class
|
||||
hierarchy of languages this structure will continue to contain a
|
||||
mixture of both data and function pointers.
|
||||
|
||||
Once the class hierarchy of languages in place the first task is to
|
||||
remove the function pointers from this structure and convert them into
|
||||
member functions on the different language classes.
|
||||
|
||||
The current plan it to keep the constant data that describes a language
|
||||
in this structure, and have each language pass in an instance of this
|
||||
structure at construction time. */
|
||||
|
||||
struct language_data
|
||||
{
|
||||
};
|
||||
|
||||
/* Base class from which all other language classes derive. */
|
||||
|
||||
struct language_defn : language_data
|
||||
struct language_defn
|
||||
{
|
||||
language_defn (enum language lang, const language_data &init_data)
|
||||
: language_data (init_data),
|
||||
la_language (lang)
|
||||
language_defn (enum language lang)
|
||||
: la_language (lang)
|
||||
{
|
||||
/* We should only ever create one instance of each language. */
|
||||
gdb_assert (languages[lang] == nullptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue