#ifdef HAVE_CONFIG_H
-# include <config.h>
+# include "config.h"
+#endif
+
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
#endif
-#include <stdlib.h>
#include <stdio.h>
#include "typewalk.h"
}
}
-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);
}
++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);