Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
a6d3955e
Commit
a6d3955e
authored
May 27, 2011
by
Matthias Braun
Browse files
a const ir_graph is enough for get_idx_irn
parent
8fb3d3db
Changes
3
Hide whitespace changes
Inline
Side-by-side
include/libfirm/irgraph.h
View file @
a6d3955e
...
...
@@ -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
);
/******************************************************************************/
...
...
ir/ir/irgraph.c
View file @
a6d3955e
...
...
@@ -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
);
}
...
...
ir/ir/irgraph_t.h
View file @
a6d3955e
...
...
@@ -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
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment