diff options
author | Christian Biesinger <cbiesinger@google.com> | 2019-12-11 19:50:43 -0500 |
---|---|---|
committer | Christian Biesinger <cbiesinger@google.com> | 2019-12-16 00:44:58 -0600 |
commit | d3ecddab5fc036fb57588a9bfff73575dc419052 (patch) | |
tree | c8f55940571566a15e9ecec31841d9ee038835b6 /gdb/ctfread.c | |
parent | c1b5c1ebc938b6dc0277363b8c47d75b0b5a621f (diff) | |
download | gdb-d3ecddab5fc036fb57588a9bfff73575dc419052.zip gdb-d3ecddab5fc036fb57588a9bfff73575dc419052.tar.gz gdb-d3ecddab5fc036fb57588a9bfff73575dc419052.tar.bz2 |
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
Diffstat (limited to 'gdb/ctfread.c')
-rw-r--r-- | gdb/ctfread.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/ctfread.c b/gdb/ctfread.c index c5f9130..06a4bc2 100644 --- a/gdb/ctfread.c +++ b/gdb/ctfread.c @@ -379,7 +379,7 @@ ctf_add_enum_member_cb (const char *name, int enum_value, void *arg) struct symbol *sym = allocate_symbol (ccp->of); OBJSTAT (ccp->of, n_syms++); - SYMBOL_SET_LANGUAGE (sym, language_c, &ccp->of->objfile_obstack); + sym->set_language (language_c, &ccp->of->objfile_obstack); SYMBOL_SET_NAMES (sym, name, false, ccp->of); SYMBOL_ACLASS_INDEX (sym) = LOC_CONST; SYMBOL_DOMAIN (sym) = VAR_DOMAIN; @@ -408,7 +408,7 @@ new_symbol (ctf_context_t *ccp, struct type *type, ctf_id_t tid) sym = allocate_symbol (objfile); OBJSTAT (objfile, n_syms++); - SYMBOL_SET_LANGUAGE (sym, language_c, &objfile->objfile_obstack); + sym->set_language (language_c, &objfile->objfile_obstack); SYMBOL_SET_NAMES (sym, name.get (), true, objfile); SYMBOL_DOMAIN (sym) = VAR_DOMAIN; SYMBOL_ACLASS_INDEX (sym) = LOC_OPTIMIZED_OUT; |