do not use new_Bad(), as this depends on current_ir_graph, cast
[libfirm] / ir / ir / irprog_t.h
index 7614348..9478fbf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
  *
  * This file is part of libFirm.
  *
@@ -120,6 +120,12 @@ get_irp_new_node_nr(void) {
 }
 #endif /* DEBUG_libfirm */
 
+static INLINE int
+get_irp_new_irg_idx(void) {
+       assert(irp);
+       return irp->max_irg_idx++;
+}
+
 static INLINE ir_graph *
 _get_const_code_irg(void) {
        return irp->const_code_irg;