forked from Imagelibrary/binutils-gdb
Use a member function to set a symbol's language
This removes symbol_set_language and SYMBOL_SET_LANGUAGE in favor of a new function general_symbol_info::set_language. symbol and minimal_symbol already inherit from that struct so this works naturally. gdb/ChangeLog: 2019-12-15 Christian Biesinger <cbiesinger@google.com> * ada-exp.y (write_ambiguous_var): Update. * coffread.c (process_coff_symbol): Update. * ctfread.c (ctf_add_enum_member_cb): Update. (new_symbol): Update. * dwarf2read.c (fixup_go_packaging): Update. (new_symbol): Update. * language.c (language_alloc_type_symbol): Update. * mdebugread.c (new_symbol): Update. * minsyms.c (minimal_symbol_reader::record_full): Update. * psymtab.c (add_psymbol_to_bcache): Update. * stabsread.c (define_symbol): Update. (read_enum_type): Update. * symtab.c (symbol_set_language): Make this a member function... (general_symbol_info::set_language): ... here. * symtab.h (struct general_symbol_info) <set_language>: New function. (SYMBOL_SET_LANGUAGE): Remove. (symbol_set_language): Remove. Change-Id: Ideafb6c384004b9adef793a1192735c501da41d5
This commit is contained in:
@@ -1051,7 +1051,7 @@ language_alloc_type_symbol (enum language lang, struct type *type)
|
||||
symbol = new (gdbarch_obstack (gdbarch)) struct symbol ();
|
||||
|
||||
symbol->name = TYPE_NAME (type);
|
||||
symbol_set_language (symbol, lang, nullptr);
|
||||
symbol->set_language (lang, nullptr);
|
||||
symbol->owner.arch = gdbarch;
|
||||
SYMBOL_OBJFILE_OWNED (symbol) = 0;
|
||||
SYMBOL_TYPE (symbol) = type;
|
||||
|
||||
Reference in New Issue
Block a user