Commit a6d3955e authored by Matthias Braun's avatar Matthias Braun
Browse files

a const ir_graph is enough for get_idx_irn

parent 8fb3d3db
......@@ -259,7 +259,7 @@ FIRM_API size_t get_irg_idx(const ir_graph *irg);
* index.
* @note The node you got might be dead.
*/
FIRM_API ir_node *get_idx_irn(ir_graph *irg, unsigned idx);
FIRM_API ir_node *get_idx_irn(const ir_graph *irg, unsigned idx);
/******************************************************************************/
......
......@@ -491,7 +491,7 @@ size_t get_irg_idx(const ir_graph *irg)
return irg->index;
}
ir_node *(get_idx_irn)(ir_graph *irg, unsigned idx)
ir_node *(get_idx_irn)(const ir_graph *irg, unsigned idx)
{
return _get_idx_irn(irg, idx);
}
......
......@@ -447,7 +447,7 @@ static inline void irg_kill_node(ir_graph *irg, ir_node *n)
* @return The node with that index or NULL, if there is no node with that index.
* @note The node you got might be dead.
*/
static inline ir_node *_get_idx_irn(ir_graph *irg, unsigned idx)
static inline ir_node *_get_idx_irn(const ir_graph *irg, unsigned idx)
{
assert(idx < (unsigned) ARR_LEN(irg->idx_irn_map));
return irg->idx_irn_map[idx];
......
Markdown is supported
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