dwarf2out.c (reference_to_unused, [...]): Avoid creating of new varool nodes.

* dwarf2out.c (reference_to_unused,
	premark_types_used_by_global_vars_helper): Avoid creating of new
	varool nodes.

From-SVN: r160052
This commit is contained in:
Jan Hubicka 2010-05-30 14:27:18 +02:00 committed by Jan Hubicka
parent d56026c21e
commit 0b9c3a0404
2 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2010-05-30 Jan Hubicka <jh@suse.cz>
* dwarf2out.c (reference_to_unused,
premark_types_used_by_global_vars_helper): Avoid creating of new
varool nodes.
2010-05-30 Jan Hubicka <jh@suse.cz>
* cgraph.h (cgraph_node_cannot_return,

View File

@ -15938,8 +15938,8 @@ reference_to_unused (tree * tp, int * walk_subtrees,
return *tp;
else if (TREE_CODE (*tp) == VAR_DECL)
{
struct varpool_node *node = varpool_node (*tp);
if (!node->needed)
struct varpool_node *node = varpool_get_node (*tp);
if (!node || !node->needed)
return *tp;
}
else if (TREE_CODE (*tp) == FUNCTION_DECL
@ -18213,8 +18213,8 @@ premark_types_used_by_global_vars_helper (void **slot,
{
/* Ask cgraph if the global variable really is to be emitted.
If yes, then we'll keep the DIE of ENTRY->TYPE. */
struct varpool_node *node = varpool_node (entry->var_decl);
if (node->needed)
struct varpool_node *node = varpool_get_node (entry->var_decl);
if (node && node->needed)
{
die->die_perennial_p = 1;
/* Keep the parent DIEs as well. */