Sprinkle const on the in array of node constructors with variable arity.
authorChristoph Mallon <christoph.mallon@gmx.de>
Sat, 5 Feb 2011 15:40:02 +0000 (15:40 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Sat, 5 Feb 2011 15:40:02 +0000 (15:40 +0000)
[r28310]

include/libfirm/irnode.h
ir/ir/irnode.c
scripts/gen_ir.py

index b1a89a3..f92428b 100644 (file)
@@ -231,7 +231,7 @@ FIRM_API op_pin_state is_irn_pinned_in_irg(const ir_node *node);
  */
 FIRM_API ir_node *new_ir_node(dbg_info *db, ir_graph *irg, ir_node *block,
                               ir_op *op, ir_mode *mode,
-                              int arity, ir_node *in[]);
+                              int arity, ir_node *const *in);
 
 /**
  * Return the block the node belongs to.  This is only
index fa66010..193f08d 100644 (file)
@@ -144,7 +144,7 @@ struct struct_align {
  * If arity is negative, a node with a dynamic array is created.
  */
 ir_node *new_ir_node(dbg_info *db, ir_graph *irg, ir_node *block, ir_op *op,
-                     ir_mode *mode, int arity, ir_node **in)
+                     ir_mode *mode, int arity, ir_node *const *in)
 {
        ir_node *res;
        unsigned align = offsetof(struct struct_align, s) - 1;
index 107ad81..7ce02de 100755 (executable)
@@ -236,7 +236,7 @@ def preprocess_node(node):
                                name    = "arity",
                                comment = "size of additional inputs array"))
                arguments.append(dict(
-                               type    = "ir_node **",
+                               type    = "ir_node *const *",
                                name    = "in",
                                comment = "additional inputs"))