fix wrong types
[libfirm] / ir / ana / trouts.c
index 9809a23..dfda263 100644 (file)
  */
 #include "config.h"
 
-#include "irnode.h"
 #include "trouts.h"
 
 #include "array.h"
 #include "pmap.h"
 
+#include "irnode_t.h"
 #include "irprog_t.h"
 #include "irgwalk.h"
 #include "irnode.h"
@@ -196,7 +196,7 @@ static ir_type **get_type_arraytype_array(const ir_type *tp)
        return res;
 }
 
-void set_type_arraytype_array(const ir_type *tp, ir_type **pts)
+static void set_type_arraytype_array(const ir_type *tp, ir_type **pts)
 {
        ir_type **old = pmap_get(type_arraytype_map, tp);
        if (old != pts)
@@ -245,6 +245,7 @@ static void add_entity_access(const ir_entity *ent, ir_node *n)
        set_entity_access_array(ent, accs);
 }
 
+#if 0
 void set_entity_access(const ir_entity *ent, int pos, ir_node *n)
 {
        ir_node ** accs;
@@ -255,6 +256,7 @@ void set_entity_access(const ir_entity *ent, int pos, ir_node *n)
        accs = get_entity_access_array(ent);
        accs[pos] = n;
 }
+#endif
 
 /*------------------------------------------------------------------*/
 
@@ -290,6 +292,7 @@ static void add_entity_reference(const ir_entity *ent, ir_node *n)
        set_entity_reference_array(ent, refs);
 }
 
+#if 0
 void set_entity_reference(const ir_entity *ent, int pos, ir_node *n)
 {
        ir_node ** refs;
@@ -300,7 +303,7 @@ void set_entity_reference(const ir_entity *ent, int pos, ir_node *n)
        refs = get_entity_reference_array(ent);
        refs[pos] = n;
 }
-
+#endif
 
 /**------------------------------------------------------------------*/
 /*   Access routines for types                                       */
@@ -339,6 +342,7 @@ static void add_type_alloc(const ir_type *tp, ir_node *n)
        set_type_alloc_array(tp, allocs);
 }
 
+#if 0
 void set_type_alloc(const ir_type *tp, int pos, ir_node *n)
 {
        ir_node **allocs;
@@ -349,6 +353,7 @@ void set_type_alloc(const ir_type *tp, int pos, ir_node *n)
        allocs = get_type_alloc_array(tp);
        allocs[pos] = n;
 }
+#endif
 
 /* Number of Cast nodes that create an instance of this type */
 int get_type_n_casts(const ir_type *tp)
@@ -408,6 +413,7 @@ void add_type_cast(const ir_type *tp, ir_node *n)
        set_type_cast_array(tp, casts);
 }
 
+#if 0
 void set_type_cast(const ir_type *tp, int pos, ir_node *n)
 {
        ir_node **casts;
@@ -418,6 +424,7 @@ void set_type_cast(const ir_type *tp, int pos, ir_node *n)
        casts = get_type_cast_array(tp);
        casts[pos] = n;
 }
+#endif
 
 /*------------------------------------------------------------------*/
 
@@ -449,10 +456,11 @@ void add_type_pointertype_to(const ir_type *tp, ir_type *ptp)
        assert(ptp && is_Pointer_type(ptp));
 
        pts = get_type_pointertype_array(tp);
-       ARR_APP1(ir_node *, pts, ptp);
+       ARR_APP1(ir_type*, pts, ptp);
        set_type_pointertype_array(tp, pts);
 }
 
+#if 0
 void set_type_pointertype_to(const ir_type *tp, int pos, ir_type *ptp)
 {
        ir_type ** pts;
@@ -463,7 +471,7 @@ void set_type_pointertype_to(const ir_type *tp, int pos, ir_type *ptp)
        pts = get_type_pointertype_array(tp);
        pts[pos] = ptp;
 }
-
+#endif
 
 /*------------------------------------------------------------------*/
 
@@ -495,10 +503,11 @@ void  add_type_arraytype_of(const ir_type *tp, ir_type *atp)
        assert(atp && is_Array_type(atp));
 
        pts = get_type_arraytype_array(tp);
-       ARR_APP1(ir_node *, pts, atp);
+       ARR_APP1(ir_type*, pts, atp);
        set_type_arraytype_array(tp, pts);
 }
 
+#if 0
 void  set_type_arraytype_of(const ir_type *tp, int pos, ir_type *atp)
 {
        ir_type ** pts;
@@ -509,6 +518,7 @@ void  set_type_arraytype_of(const ir_type *tp, int pos, ir_type *atp)
        pts = get_type_arraytype_array(tp);
        pts[pos] = atp;
 }
+#endif
 
 /*------------------------------------------------------------------*/
 /* Building and Removing the out datastructure                      */
@@ -665,8 +675,9 @@ void free_trouts(void)
                ir_node **accs;
                for (accs = (ir_node **)pmap_first(entity_access_map);
                        accs;
-                       accs = (ir_node **)pmap_next(entity_access_map))
-                       ; //DEL_ARR_F(accs);
+                       accs = (ir_node **)pmap_next(entity_access_map)) {
+                       /* DEL_ARR_F(accs); */
+               }
                pmap_destroy(entity_access_map);
                entity_access_map = NULL;
        }
@@ -675,8 +686,9 @@ void free_trouts(void)
                ir_node **refs;
                for (refs = (ir_node **)pmap_first(entity_reference_map);
                        refs;
-                       refs = (ir_node **)pmap_next(entity_reference_map))
-                       ; //DEL_ARR_F(refs);
+                       refs = (ir_node **)pmap_next(entity_reference_map)) {
+                       /* DEL_ARR_F(refs); */
+               }
                pmap_destroy(entity_reference_map);
                entity_reference_map = NULL;
        }
@@ -685,8 +697,9 @@ void free_trouts(void)
                ir_node **alls;
                for (alls = (ir_node **)pmap_first(type_alloc_map);
                        alls;
-                       alls = (ir_node **)pmap_next(type_alloc_map))
-                       ; //DEL_ARR_F(alls);
+                       alls = (ir_node **)pmap_next(type_alloc_map)) {
+                       /* DEL_ARR_F(alls); */
+               }
                pmap_destroy(type_alloc_map);
                type_alloc_map = NULL;
        }
@@ -695,8 +708,9 @@ void free_trouts(void)
                ir_node **casts;
                for (casts = (ir_node **)pmap_first(type_cast_map);
                        casts;
-                       casts = (ir_node **)pmap_next(type_cast_map))
-                       ; //DEL_ARR_F(alls);
+                       casts = (ir_node **)pmap_next(type_cast_map)) {
+                       /* DEL_ARR_F(alls); */
+               }
                pmap_destroy(type_cast_map);
                type_cast_map = NULL;
        }
@@ -705,8 +719,9 @@ void free_trouts(void)
                ir_node **pts;
                for (pts = (ir_node **)pmap_first(type_pointertype_map);
                        pts;
-                       pts = (ir_node **)pmap_next(type_pointertype_map))
-                       ; //DEL_ARR_F(pts);
+                       pts = (ir_node **)pmap_next(type_pointertype_map)) {
+                       /* DEL_ARR_F(pts); */
+               }
                pmap_destroy(type_pointertype_map);
                type_pointertype_map = NULL;
        }
@@ -715,8 +730,9 @@ void free_trouts(void)
                ir_node **pts;
                for (pts = (ir_node **)pmap_first(type_arraytype_map);
                        pts;
-                       pts = (ir_node **)pmap_next(type_arraytype_map))
-                       ; //DEL_ARR_F(pts);
+                       pts = (ir_node **)pmap_next(type_arraytype_map)) {
+                       /* DEL_ARR_F(pts); */
+               }
                pmap_destroy(type_arraytype_map);
                type_arraytype_map = NULL;
        }