Fix typo in comment.
[libfirm] / ir / opt / ircgopt.c
index b462fc6..e962a8c 100644 (file)
@@ -63,9 +63,9 @@ static void collect_call(ir_node *node, void *env) {
  * Type walker, set the peculiarity of entities which graphs
  * gets removed to peculiarity_description.
  */
-static void make_entity_to_description(type_or_ent *tore, void *env) {
-       if (get_kind(tore) == k_entity) {
-               ir_entity *ent = (ir_entity *)tore;
+static void make_entity_to_description(type_or_ent tore, void *env) {
+       if (is_entity(tore.ent)) {
+               ir_entity *ent = tore.ent;
 
                if ((is_Method_type(get_entity_type(ent)))                        &&
                        (get_entity_peculiarity(ent) != peculiarity_description)      &&
@@ -108,7 +108,7 @@ void gc_irgs(int n_keep, ir_entity ** keep_arr) {
                                ir_node *node = get_irg_end(irg);
 
                                /* collect calls */
-                               set_using_irn_link(irg);
+                               ir_reserve_resources(irg, IR_RESOURCE_IRN_LINK);
                                irg_walk_graph(irg, firm_clear_link, collect_call, node);
 
                                /* iterate calls */
@@ -128,7 +128,7 @@ void gc_irgs(int n_keep, ir_entity ** keep_arr) {
                                                }
                                        }
                                }
-                               clear_using_irn_link(irg);
+                               ir_free_resources(irg, IR_RESOURCE_IRN_LINK);
                        }
                }
                DEL_ARR_F(marked);