backport: re PR debug/29614 (DWARF information for function static variable is missing after unrelated code addition)

Backported from mainline
	PR debug/29614
	* cgraph.h (cgraph_varpool_last_needed_node): Make global.
	* cgraph.c (cgraph_varpool_last_needed_node): Ditto.
	* cgraphunit.c (cgraph_varpool_assemble_pending_decls):
	Set cgraph_varpool_last_needed_node to NULL.

From-SVN: r122583
This commit is contained in:
Steve Ellcey
2007-03-05 23:52:09 +00:00
committed by Steve Ellcey
parent 301cd37ffa
commit fe7cdf217a
4 changed files with 15 additions and 2 deletions

View File

@@ -1,3 +1,12 @@
2007-03-05 Steve Ellcey <sje@cup.hp.com>
Backported from mainline
PR debug/29614
* cgraph.h (cgraph_varpool_last_needed_node): Make global.
* cgraph.c (cgraph_varpool_last_needed_node): Ditto.
* cgraphunit.c (cgraph_varpool_assemble_pending_decls):
Set cgraph_varpool_last_needed_node to NULL.
2007/03/05 David Taylor <dtaylor@emc.com>
PR 31050

View File

@@ -139,8 +139,8 @@ struct cgraph_varpool_node *cgraph_varpool_nodes_queue, *cgraph_varpool_first_un
/* The linked list of cgraph varpool nodes. */
struct cgraph_varpool_node *cgraph_varpool_nodes;
/* End of the varpool queue. Needs to be QTYed to work with PCH. */
static GTY(()) struct cgraph_varpool_node *cgraph_varpool_last_needed_node;
/* End of the varpool queue. */
struct cgraph_varpool_node *cgraph_varpool_last_needed_node;
/* Linked list of cgraph asm nodes. */
struct cgraph_asm_node *cgraph_asm_nodes;

View File

@@ -249,6 +249,7 @@ extern GTY(()) struct cgraph_node *cgraph_nodes_queue;
extern GTY(()) struct cgraph_node *cgraph_expand_queue;
extern GTY(()) struct cgraph_varpool_node *cgraph_varpool_first_unanalyzed_node;
extern GTY(()) struct cgraph_varpool_node *cgraph_varpool_last_needed_node;
extern GTY(()) struct cgraph_varpool_node *cgraph_varpool_nodes_queue;
extern GTY(()) struct cgraph_varpool_node *cgraph_varpool_nodes;
extern GTY(()) struct cgraph_asm_node *cgraph_asm_nodes;

View File

@@ -897,6 +897,9 @@ cgraph_varpool_assemble_pending_decls (void)
else
node->next_needed = NULL;
}
/* cgraph_varpool_nodes_queue is now empty, clear the pointer to the last
element in the queue. */
cgraph_varpool_last_needed_node = NULL;
return changed;
}
/* Output all variables enqueued to be assembled. */