- removed permanent debug output
[libfirm] / ir / ana / cgana.c
index f3cf4b6..3d42da8 100644 (file)
  *  methods that are 'free', i.e., their adress is handled by
  *  the program directly, or they are visible external.
  */
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include "config.h"
 
-#ifdef HAVE_STRING_H
 # include <string.h>
-#endif
 
 #include "cgana.h"
 #include "rta.h"
 
 #include "irdump.h"
 
-#include "irhooks.h"
-
-
-
 /* unambiguous address used as a mark. */
 static void *MARK = &MARK;
 
@@ -413,9 +405,6 @@ static void free_mark(ir_node *node, eset * set) {
                        if (is_method_entity(ent)) {
                                eset_insert(set, ent);
                        }
-               } else {
-                       assert(get_SymConst_kind(node) == symconst_addr_name);
-                       /* nothing: SymConst points to extern method */
                }
                break;
 
@@ -632,7 +621,7 @@ static ir_entity **get_free_methods(int *length)
 
        /* Finally, transform the set into an array. */
        *length = eset_count(free_set);
-       arr = xmalloc(sizeof(ir_entity *) * (*length));
+       arr = XMALLOCN(ir_entity*, *length);
        for (i = 0, ent = eset_first(free_set); ent; ent = eset_next(free_set)) {
                arr[i++] = ent;
        }