autoconf stuff
[libfirm] / ir / ir / irprog.c
index 20973ae..2e00771 100644 (file)
@@ -6,7 +6,11 @@
 ** irprog.c: ir representation of a program
 */
 
-# include "irprog.h"
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+# include "irprog_t.h"
 # include "array.h"
 # include "obst.h"
 
@@ -35,6 +39,10 @@ ir_prog *new_ir_prog (void) {
                                               strlen(GLOBAL_TYPE_NAME)));
   add_irp_type((type *)res->glob_type);
 
+#ifdef DEBUG_libfirm
+  res->max_node_nr = 1;
+#endif
+
   return res;
 }
 
@@ -111,8 +119,10 @@ void  set_irp_type(int pos, type *typ) {
 
 }
 
+#ifdef DEBUG_libfirm
 int get_irp_new_node_nr() {
   assert(irp);
   irp->max_node_nr = irp->max_node_nr + 1;
   return irp->max_node_nr - 1;
 }
+#endif