* 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
+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>
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));
}
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);
}