Commit aa8b5906 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Constify

[r8098]
parent e0b59095
......@@ -96,14 +96,14 @@ copy_irn_to_irg(ir_node *n, ir_graph *irg)
/*
* Creates an exact copy of a node.
* The copy resists on the sane graph in the same block.
* The copy resides in the same graph in the same block.
*/
ir_node *exact_copy(ir_node *n) {
ir_node *exact_copy(const ir_node *n) {
ir_graph *irg = get_irn_irg(n);
ir_node *res, *block = NULL;
if (is_no_Block(n))
block = get_irn_n(n, -1);
block = get_nodes_block(n);
res = new_ir_node(get_irn_dbg_info(n),
irg,
......
......@@ -72,6 +72,6 @@ void copy_irn_to_irg(ir_node *n, ir_graph *irg);
* @note If the copy is not changed, the next CSE operation will
* replace it by the original, so beware.
*/
ir_node *exact_copy(ir_node *n);
ir_node *exact_copy(const ir_node *n);
#endif /* _FIRM_COMMON_IRTOOLS_H_ */
......@@ -50,7 +50,7 @@ set_irn_dbg_info(ir_node *n, struct dbg_info* db) {
}
struct dbg_info *
get_irn_dbg_info(ir_node *n) {
get_irn_dbg_info(const ir_node *n) {
return n->dbi;
}
......
......@@ -60,7 +60,7 @@ void set_irn_dbg_info(ir_node *n, dbg_info *db);
/**
* Returns the debug information of an node.
*/
dbg_info *get_irn_dbg_info(ir_node *n);
dbg_info *get_irn_dbg_info(const ir_node *n);
/**
* Sets the debug information of an entity.
......
......@@ -647,7 +647,7 @@ get_Block_cfgpred_arr (ir_node *node)
}
int
(get_Block_n_cfgpreds)(ir_node *node) {
(get_Block_n_cfgpreds)(const ir_node *node) {
return _get_Block_n_cfgpreds(node);
}
......
......@@ -282,7 +282,7 @@ int is_value_arg_pointer(ir_node *n);
/* @@@ no more supported */
ir_node **get_Block_cfgpred_arr (ir_node *node);
int get_Block_n_cfgpreds (ir_node *node);
int get_Block_n_cfgpreds (const ir_node *node);
ir_node *get_Block_cfgpred (ir_node *node, int pos);
void set_Block_cfgpred (ir_node *node, int pos, ir_node *pred);
/** Get the predecessor block.
......
......@@ -663,7 +663,7 @@ _is_Block(const ir_node *node) {
}
static INLINE int
_get_Block_n_cfgpreds(ir_node *node) {
_get_Block_n_cfgpreds(const ir_node *node) {
assert(_is_Block(node));
return _get_irn_arity(node);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment