* coffread.c (process_coff_symbol, coff_read_enum_type): Call

allocate_symbol.
	* dwarf2read.c (fixup_go_packaging): Call allocate_symbol.
	(read_func_scope): Call allocate_template_symbol.
	(new_symbol_full): Call allocate_symbol.
	* jit.c (finalize_symtab): Call allocate_symbol.
	* jv-lang.c (add_class_symbol): Call allocate_symbol.
	* mdebugread.c (parse_symbol, new_block): Call allocate_symbol.
	* stabsread.c (patch_block_stabs, define_symbol, read_enum_type)
	(common_block_end): Call allocate_symbol.
	* symtab.c (allocate_symbol, initialize_symbol)
	(allocate_template_symbol): New functions.
	* symtab.c (allocate_symbol, initialize_symbol)
	(allocate_template_symbol): Declare.
	* xcoffread.c (process_xcoff_symbol): Call initialize_symbol.
This commit is contained in:
Tom Tromey
2013-04-08 19:48:30 +00:00
parent 5f77db5271
commit e623cf5da2
10 changed files with 76 additions and 44 deletions

View File

@@ -1048,10 +1048,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
FIELD_NAME (*f) = debug_info->ss + cur_fdr->issBase + tsym.iss;
FIELD_BITSIZE (*f) = 0;
enum_sym = ((struct symbol *)
obstack_alloc (&mdebugread_objfile->objfile_obstack,
sizeof (struct symbol)));
memset (enum_sym, 0, sizeof (struct symbol));
enum_sym = allocate_symbol (mdebugread_objfile);
SYMBOL_SET_LINKAGE_NAME
(enum_sym,
obstack_copy0 (&mdebugread_objfile->objfile_obstack,
@@ -4879,11 +4876,8 @@ new_block (enum block_type type)
static struct symbol *
new_symbol (char *name)
{
struct symbol *s = ((struct symbol *)
obstack_alloc (&mdebugread_objfile->objfile_obstack,
sizeof (struct symbol)));
struct symbol *s = allocate_symbol (mdebugread_objfile);
memset (s, 0, sizeof (*s));
SYMBOL_SET_LANGUAGE (s, psymtab_language);
SYMBOL_SET_NAMES (s, name, strlen (name), 1, mdebugread_objfile);
return s;