/* Copyright (C) 2000 by Universitaet Karlsruhe
-** All rights reserved.
-**
-** Authors: Goetz Lindenmaier
-**
-** irprog.c: ir representation of a program
+* All rights reserved.
+*
+* Authors: Goetz Lindenmaier
+*
+* irprog.c: ir representation of a program
*/
/* $Id$ */
/* res->obst = (struct obstack *) xmalloc (sizeof (struct obstack)); */
res->graphs = NEW_ARR_F (ir_graph *, 1);
res->types = NEW_ARR_F (type *, 1);
+
+#ifdef DEBUG_libfirm
+ res->max_node_nr = 0;
+#endif
+
res->glob_type = new_type_class(id_from_str (GLOBAL_TYPE_NAME,
strlen(GLOBAL_TYPE_NAME)));
/* Remove type from type list. Must be treated differently than
res->const_code_irg = new_const_code_irg();
-#ifdef DEBUG_libfirm
- res->max_node_nr = 1;
-#endif
return res;
}
}
#ifdef DEBUG_libfirm
-static int get_irp_new_node_nr() {
+int get_irp_new_node_nr() {
assert(irp);
irp->max_node_nr = irp->max_node_nr + 1;
return irp->max_node_nr - 1;