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
7b113152
Commit
7b113152
authored
Jul 14, 2003
by
Sebastian Felis
Browse files
add is_ir_node() function.
[r1479]
parent
c937e07b
Changes
2
Hide whitespace changes
Inline
Side-by-side
ir/ir/irnode.c
View file @
7b113152
...
...
@@ -137,6 +137,15 @@ copy_attrs (ir_node *old, ir_node *new) {
/** getting some parameters from ir_nodes **/
int
is_ir_node
(
void
*
thing
)
{
assert
(
thing
);
if
(
get_kind
(
thing
)
==
k_ir_node
)
return
1
;
else
return
0
;
}
/* returns the number of predecessors without the block predecessor. */
INLINE
int
get_irn_arity
(
const
ir_node
*
node
)
{
...
...
ir/ir/irnode.h
View file @
7b113152
...
...
@@ -82,6 +82,17 @@ typedef struct ir_node ir_node;
* of nodes, it's just a big graph.
*/
/**
* Checks whether a pointer points to a ir node.
*
* @param thing an arbitrary pointer
*
* @return
* true if the thing is a ir mode, else false
*/
int
is_ir_node
(
void
*
thing
);
/** returns the number of predecessors without the block predecessor: */
int
get_irn_arity
(
const
ir_node
*
node
);
...
...
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