Commit bdd44e30 authored by Michael Beck's avatar Michael Beck
Browse files

Fixed backward iteration using size_t again.

[r28373]
parent 0a6a473a
......@@ -149,8 +149,8 @@ static void garbage_collect_in_segment(ir_type *segment)
void garbage_collect_entities(void)
{
/*ssize_t*/long i;
ir_segment_t s;
size_t i;
ir_segment_t s;
FIRM_DBG_REGISTER(dbg, "firm.opt.garbagecollect");
......@@ -169,8 +169,8 @@ void garbage_collect_entities(void)
/* remove graphs of non-visited functions
* (we have to count backwards so we can safely call remove_irp_irg
* while iterating) */
for (i = get_irp_n_irgs()-1; i >= 0; --i) {
ir_graph *irg = get_irp_irg(i);
for (i = get_irp_n_irgs(); i > 0;) {
ir_graph *irg = get_irp_irg(--i);
ir_entity *entity = get_irg_entity(irg);
if (entity_visited(entity))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment