do not use new_Bad(), as this depends on current_ir_graph, cast
[libfirm] / ir / ir / irgraph.c
index 103a763..a172f4b 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.
  *
@@ -259,7 +259,6 @@ ir_graph *new_r_ir_graph(ir_entity *ent, int n_loc) {
 #ifdef DEBUG_libfirm
        res->graph_nr    = get_irp_new_node_nr();
 #endif
-       res->proj_args   = NULL;
 
        /*
         * The code generation needs it. leave it in now.
@@ -413,14 +412,15 @@ int
        return _is_ir_graph(thing);
 }
 
-/* Outputs a unique number for this node */
-long get_irg_graph_nr(ir_graph *irg) {
-       assert(irg);
 #ifdef DEBUG_libfirm
+/* Outputs a unique number for this node */
+long get_irg_graph_nr(const ir_graph *irg) {
        return irg->graph_nr;
-#else
-       return (long)PTR_TO_INT(irg);
+}
 #endif
+
+int get_irg_idx(const ir_graph *irg) {
+       return irg->index;
 }
 
 ir_node *
@@ -544,16 +544,6 @@ void
        _set_irg_value_param_base(irg, node);
 }
 
-ir_node **
-(get_irg_proj_args) (const ir_graph *irg) {
-       return _get_irg_proj_args (irg);
-}
-
-void
-(set_irg_proj_args) (ir_graph *irg, ir_node **nodes) {
-       _set_irg_proj_args (irg, nodes);
-}
-
 ir_node *
 (get_irg_bad)(const ir_graph *irg) {
        return _get_irg_bad(irg);