Replace SYMBOL_SET_LINKAGE_NAME with a member function

Easier to read, shorter, and will later make it possible to make the
name field private.

gdb/ChangeLog:

2019-11-27  Christian Biesinger  <cbiesinger@google.com>

	* ada-exp.y (write_ambiguous_var): Replace SYMBOL_SET_LINKAGE_NAME
	with sym->set_linkage_name.
	* coffread.c (coff_read_enum_type): Likewise.
	* mdebugread.c (parse_symbol): Likewise.
	* stabsread.c (patch_block_stabs): Likewise.
	(define_symbol): Likewise.
	(read_enum_type): Likewise.
	(common_block_end): Likewise.
	* symtab.h (struct general_symbol_info) <set_linkage_name>: New
	function.
	(SYMBOL_SET_LINKAGE_NAME): Remove.
	* xcoffread.c (process_xcoff_symbol): Replace SYMBOL_SET_LINKAGE_NAME
	with sym->set_linkage_name.

Change-Id: I174a0542c014f1b035070068076308bb8ae79abb
This commit is contained in:
Christian Biesinger
2019-11-26 14:41:30 -06:00
parent db5960b4d2
commit 43678b0afe
7 changed files with 37 additions and 25 deletions

View File

@@ -2106,7 +2106,7 @@ coff_read_enum_type (int index, int length, int lastsym,
sym = allocate_symbol (objfile);
name = obstack_strdup (&objfile->objfile_obstack, name);
SYMBOL_SET_LINKAGE_NAME (sym, name);
sym->set_linkage_name (name);
SYMBOL_ACLASS_INDEX (sym) = LOC_CONST;
SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
SYMBOL_VALUE (sym) = ms->c_value;