cleanup: Remove code duplication for implementing get_irg_graph_nr().
authorChristoph Mallon <christoph.mallon@gmx.de>
Fri, 21 Dec 2012 18:01:30 +0000 (19:01 +0100)
committerChristoph Mallon <christoph.mallon@gmx.de>
Fri, 21 Dec 2012 18:01:30 +0000 (19:01 +0100)
ir/ir/irgraph.c

index 5247dd1..8ecf734 100644 (file)
@@ -347,17 +347,14 @@ int (is_ir_graph)(const void *thing)
        return is_ir_graph_(thing);
 }
 
-#ifdef DEBUG_libfirm
 long get_irg_graph_nr(const ir_graph *irg)
 {
+#ifdef DEBUG_libfirm
        return irg->graph_nr;
-}
 #else
-long get_irg_graph_nr(const ir_graph *irg)
-{
        return PTR_TO_INT(irg);
-}
 #endif
+}
 
 size_t get_irg_idx(const ir_graph *irg)
 {