fix warning, add a panic when irio imports vector modes
[libfirm] / ir / ir / irprog_t.h
index c75467e..d6fb5e1 100644 (file)
@@ -76,7 +76,7 @@ _get_irp_n_irgs(void) {
 static inline ir_graph *
 _get_irp_irg(int pos){
        if (get_visit_pseudo_irgs()) return get_irp_allirg(pos);
-       assert(0 <= pos && pos <= _get_irp_n_irgs());
+       assert(0 <= pos && pos <= ARR_LEN(irp->graphs));
        return irp->graphs[pos];
 }
 
@@ -118,14 +118,12 @@ _get_irp_opcode(int pos) {
        return irp->opcodes[pos];
 }
 
-#ifdef DEBUG_libfirm
 /** Returns a new, unique number to number nodes or the like. */
 static inline long
 get_irp_new_node_nr(void) {
        assert(irp);
        return irp->max_node_nr++;
 }
-#endif /* DEBUG_libfirm */
 
 static inline int
 get_irp_new_irg_idx(void) {