added missing initialization
[libfirm] / ir / tr / typewalk.c
index bbf5d22..4dcae5a 100644 (file)
 
 
 #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"
@@ -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);