symtab.c (symtab_node::asm_name): Do not call printable name directly.

* symtab.c (symtab_node::asm_name): Do not call printable name directly.
	(symtab_node::name): Report name as unnamed if DECL_NAME is not set.

From-SVN: r232550
This commit is contained in:
Jan Hubicka 2016-01-19 12:51:18 +01:00 committed by Jan Hubicka
parent b2b4005150
commit ae4bbcb233
2 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2016-01-19 Jan Hubicka <hubicka@ucw.cz>
* symtab.c (symtab_node::asm_name): Do not call printable name directly.
(symtab_node::name): Report name as unnamed if DECL_NAME is not set.
2016-01-19 Martin Jambor <mjambor@suse.cz>
Martin Liska <mliska@suse.cz>
Michael Matz <matz@suse.de>

View File

@ -504,7 +504,7 @@ const char *
symtab_node::asm_name () const
{
if (!DECL_ASSEMBLER_NAME_SET_P (decl))
return lang_hooks.decl_printable_name (decl, 2);
return name ();
return IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
}
@ -513,6 +513,13 @@ symtab_node::asm_name () const
const char *
symtab_node::name () const
{
if (!DECL_NAME (decl))
{
if (DECL_ASSEMBLER_NAME_SET_P (decl))
return asm_name ();
else
return "<unnamed>";
}
return lang_hooks.decl_printable_name (decl, 2);
}