renamed reducible -> is_reducible
[libfirm] / ir / tr / tr_inheritance.c
index b79bc3c..2982d2e 100644 (file)
@@ -46,7 +46,7 @@ static void copy_entities_from_superclass(type *clss, void *env)
   int overwritten;
   type *super, *inhenttype;
   entity *inhent, *thisent;
-  mangle_inherited_name_func *mfunc = (mangle_inherited_name_func *)env;
+  mangle_inherited_name_func *mfunc = *(mangle_inherited_name_func **)env;
 
   for(i = 0; i < get_class_n_supertypes(clss); i++) {
     super = get_class_supertype(clss, i);
@@ -91,7 +91,7 @@ static void copy_entities_from_superclass(type *clss, void *env)
 void resolve_inheritance(mangle_inherited_name_func *mfunc) {
   if (!mfunc)
     mfunc = default_mangle_inherited_name;
-  class_walk_super2sub(copy_entities_from_superclass, NULL, (void *)mfunc);
+  class_walk_super2sub(copy_entities_from_superclass, NULL, (void *)&mfunc);
 }
 
 
@@ -351,12 +351,15 @@ void compute_inh_transitive_closure(void) {
     type *tp = get_irp_type(i);
     if (is_Class_type(tp) && type_not_visited(tp)) { /* For others there is nothing to accumulate. */
       int j, n_subtypes = get_class_n_subtypes(tp);
-      int has_unmarked_subtype = false;
+      int has_unmarked_subtype = 0;
 
       assert(get_type_visited(tp) < get_master_type_visited()-1);
-      for (j = 0; j < n_subtypes && !has_unmarked_subtype; ++j) {
+      for (j = 0; j < n_subtypes; ++j) {
         type *stp = get_class_subtype(tp, j);
-             if (type_not_visited(stp)) has_unmarked_subtype = true;
+        if (type_not_visited(stp)) {
+          has_unmarked_subtype = 1;
+          break;
+        }
       }
 
       /* This is a good starting point. */
@@ -372,12 +375,15 @@ void compute_inh_transitive_closure(void) {
     type *tp = get_irp_type(i);
     if (is_Class_type(tp) && type_not_visited(tp)) { /* For others there is nothing to accumulate. */
       int j, n_supertypes = get_class_n_supertypes(tp);
-      int has_unmarked_supertype = false;
+      int has_unmarked_supertype = 0;
 
       assert(get_type_visited(tp) < get_master_type_visited()-1);
-      for (j = 0; j < n_supertypes && !has_unmarked_supertype; ++j) {
+      for (j = 0; j < n_supertypes; ++j) {
              type *stp = get_class_supertype(tp, j);
-             if (type_not_visited(stp)) has_unmarked_supertype = true;
+        if (type_not_visited(stp)) {
+          has_unmarked_supertype = 1;
+          break;
+        }
       }
 
       /* This is a good starting point. */