X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Ftr%2Ftypewalk.c;h=4dcae5ac653d2f6dabe0e1187dbdbc44618ce32c;hb=ec68b2aaadb9504d101e6cbc4a58c69f3897f489;hp=bbf5d2270b734ab6a7f661467eb7ce621e3528a5;hpb=5b31947fd01f6c96e9277b83b6791df7d3d580fb;p=libfirm diff --git a/ir/tr/typewalk.c b/ir/tr/typewalk.c index bbf5d2270..4dcae5ac6 100644 --- a/ir/tr/typewalk.c +++ b/ir/tr/typewalk.c @@ -19,10 +19,13 @@ #ifdef HAVE_CONFIG_H -# include +# include "config.h" +#endif + +#ifdef HAVE_STDLIB_H +# include #endif -#include #include #include "typewalk.h" @@ -191,13 +194,10 @@ static void start_type_walk(ir_node *node, void *env) { } } -void type_walk(type_walk_func *pre, - type_walk_func *post, - void *env) { +void type_walk(type_walk_func *pre, type_walk_func *post, void *env) { int i, n_types = get_irp_n_types(); + ++type_visited; - /*type_walk_2((type_or_ent *)get_glob_type(), pre, post, env); - global type is on the list visited below, too. */ for (i = 0; i < n_types; i++) { type_walk_2((type_or_ent *)get_irp_type(i), pre, post, env); } @@ -232,7 +232,7 @@ void type_walk_irg (ir_graph *irg, ++type_visited; irg_walk(get_irg_end(irg), start_type_walk, NULL, &type_env); - type_walk_2((type_or_ent *)get_irg_ent(irg), pre, post, env); + type_walk_2((type_or_ent *)get_irg_entity(irg), pre, post, env); type_walk_2((type_or_ent *)get_irg_frame_type(irg), pre, post, env);