aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorChristian Biesinger <cbiesinger@google.com>2019-12-11 19:50:43 -0500
committerChristian Biesinger <cbiesinger@google.com>2019-12-16 00:44:58 -0600
commitd3ecddab5fc036fb57588a9bfff73575dc419052 (patch)
treec8f55940571566a15e9ecec31841d9ee038835b6 /gdb/dwarf2read.c
parentc1b5c1ebc938b6dc0277363b8c47d75b0b5a621f (diff)
downloadbinutils-d3ecddab5fc036fb57588a9bfff73575dc419052.zip
binutils-d3ecddab5fc036fb57588a9bfff73575dc419052.tar.gz
binutils-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/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 6a09d55..ecfae68 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -9952,7 +9952,7 @@ fixup_go_packaging (struct dwarf2_cu *cu)
struct symbol *sym;
sym = allocate_symbol (objfile);
- SYMBOL_SET_LANGUAGE (sym, language_go, &objfile->objfile_obstack);
+ sym->set_language (language_go, &objfile->objfile_obstack);
SYMBOL_SET_NAMES (sym, saved_package_name, false, objfile);
/* This is not VAR_DOMAIN because we want a way to ensure a lookup of,
e.g., "main" finds the "main" module and not C's main(). */
@@ -21782,7 +21782,7 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
OBJSTAT (objfile, n_syms++);
/* Cache this symbol's name and the name's demangled form (if any). */
- SYMBOL_SET_LANGUAGE (sym, cu->language, &objfile->objfile_obstack);
+ sym->set_language (cu->language, &objfile->objfile_obstack);
linkagename = dwarf2_physname (name, die, cu);
SYMBOL_SET_NAMES (sym, linkagename, false, objfile);