this file is replaced by Makefile.in. this much more conform
[libfirm] / ir / tr / typewalk.c
index 88e5f08..5f136b6 100644 (file)
@@ -9,6 +9,10 @@
 ** - execute the post function after recursion
 */
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include <stdlib.h>
 #include <stdio.h>
 #include "irgwalk.h"
@@ -75,12 +79,39 @@ void type_walk_2(type_or_ent *tore,
       }
       break;
     case k_type_class:
-      ((type_class *)tore)->visit = type_visited;
-      /* !!!!! */
+      {
+       int i;
+       ((type_class *)tore)->visit = type_visited;
+       /* CS */
+       for (i=0; i<get_class_n_member((type_class *)tore); i++)
+         {
+           type_walk_2((type_or_ent *)get_class_member((type_class *)tore, i),
+                       pre, post, env);
+         }
+       for (i=0; i<get_class_n_subtype((type_class *)tore); i++)
+         {
+           type_walk_2((type_or_ent *)get_class_subtype((type_class *)tore, i),
+                       pre, post, env);
+         }
+       for (i=0; i<get_class_n_supertype((type_class *)tore); i++)
+         {
+           type_walk_2((type_or_ent *)get_class_supertype((type_class *)tore, i),
+                       pre, post, env);
+         }
+      }
       break;
     case k_type_strct:
-      ((type_strct *)tore)->visit = type_visited;
-      /* !!!!! */
+      {
+       int i;
+
+       ((type_strct *)tore)->visit = type_visited;
+       /* CS */
+       for (i=0; i<get_strct_n_member((type_strct *)tore); i++)
+         {
+           type_walk_2((type_or_ent *)get_strct_member((type_strct *)tore, i),
+                       pre, post, env);
+         }
+      }
       break;
     case k_type_method:
       {