* 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);
/******************************************************************************/
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);
}
* @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];