From e94498b49ca60f1439326bdcdddae197b453f928 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Mon, 28 May 2007 10:15:40 +0000 Subject: [PATCH] Constify. [r14066] --- ir/ir/irnode.c | 6 +++--- ir/ir/irnode.h | 6 +++--- ir/ir/irnode_t.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ir/ir/irnode.c b/ir/ir/irnode.c index 4d5a0de06..5013c048d 100644 --- a/ir/ir/irnode.c +++ b/ir/ir/irnode.c @@ -1037,7 +1037,7 @@ set_Return_res(ir_node *node, int pos, ir_node *res){ set_irn_n(node, pos + RETURN_RESULT_OFFSET, res); } -tarval *(get_Const_tarval)(ir_node *node) { +tarval *(get_Const_tarval)(const ir_node *node) { return _get_Const_tarval(node); } @@ -1579,7 +1579,7 @@ get_Phi_preds_arr(ir_node *node) { } int -get_Phi_n_preds(ir_node *node) { +get_Phi_n_preds(const ir_node *node) { assert(is_Phi(node) || is_Phi0(node)); return (get_irn_arity(node)); } @@ -1591,7 +1591,7 @@ void set_Phi_n_preds(ir_node *node, int n_preds) { */ ir_node * -get_Phi_pred(ir_node *node, int pos) { +get_Phi_pred(const ir_node *node, int pos) { assert(is_Phi(node) || is_Phi0(node)); return get_irn_n(node, pos); } diff --git a/ir/ir/irnode.h b/ir/ir/irnode.h index 77cdea91c..0510a74f8 100644 --- a/ir/ir/irnode.h +++ b/ir/ir/irnode.h @@ -483,7 +483,7 @@ typedef enum { CNST_NO_CONST = 4 /**< The node is no const at all. */ } cnst_classify_t; -tarval *get_Const_tarval(ir_node *node); +tarval *get_Const_tarval(const ir_node *node); void set_Const_tarval(ir_node *node, tarval *con); /** @@ -899,8 +899,8 @@ int is_Phi(const ir_node *n); int is_Phi0(const ir_node *n); /* These routines also work for Filter nodes in interprocedural view. */ ir_node **get_Phi_preds_arr(ir_node *node); -int get_Phi_n_preds(ir_node *node); -ir_node *get_Phi_pred(ir_node *node, int pos); +int get_Phi_n_preds(const ir_node *node); +ir_node *get_Phi_pred(const ir_node *node, int pos); void set_Phi_pred(ir_node *node, int pos, ir_node *pred); ir_node *get_Filter_pred(ir_node *node); diff --git a/ir/ir/irnode_t.h b/ir/ir/irnode_t.h index a2d461ff9..a2aa95c13 100644 --- a/ir/ir/irnode_t.h +++ b/ir/ir/irnode_t.h @@ -919,7 +919,7 @@ _is_Block_dead(const ir_node *block) { } } -static INLINE tarval *_get_Const_tarval(ir_node *node) { +static INLINE tarval *_get_Const_tarval(const ir_node *node) { assert(_get_irn_op(node) == op_Const); return node->attr.con.tv; } -- 2.20.1