From: Christoph Mallon Date: Sat, 5 Feb 2011 15:40:02 +0000 (+0000) Subject: Sprinkle const on the in array of node constructors with variable arity. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=20f9f8abca7d902c432848500fd8a31822db0658;p=libfirm Sprinkle const on the in array of node constructors with variable arity. [r28310] --- diff --git a/include/libfirm/irnode.h b/include/libfirm/irnode.h index b1a89a369..f92428bda 100644 --- a/include/libfirm/irnode.h +++ b/include/libfirm/irnode.h @@ -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 diff --git a/ir/ir/irnode.c b/ir/ir/irnode.c index fa660108c..193f08daa 100644 --- a/ir/ir/irnode.c +++ b/ir/ir/irnode.c @@ -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; diff --git a/scripts/gen_ir.py b/scripts/gen_ir.py index 107ad813b..7ce02dee5 100755 --- a/scripts/gen_ir.py +++ b/scripts/gen_ir.py @@ -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"))