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
db2f47e7
Commit
db2f47e7
authored
Mar 23, 2005
by
Sebastian Hack
Browse files
Added is_Const
[r5464]
parent
afa42cd0
Changes
3
Hide whitespace changes
Inline
Side-by-side
ir/ir/irnode.c
View file @
db2f47e7
...
...
@@ -2123,6 +2123,11 @@ int
return
_is_Bad
(
node
);
}
int
(
is_Const
)(
const
ir_node
*
node
)
{
return
_is_Const
(
node
);
}
int
(
is_no_Block
)(
const
ir_node
*
node
)
{
return
_is_no_Block
(
node
);
...
...
ir/ir/irnode.h
View file @
db2f47e7
...
...
@@ -896,6 +896,8 @@ ir_node *skip_Id (ir_node *node); /* Same as skip_nop. */
ir_node
*
skip_Tuple
(
ir_node
*
node
);
/** returns operand of node if node is a Cast */
ir_node
*
skip_Cast
(
ir_node
*
node
);
/** returns true if irn is a Const node. */
int
is_Const
(
const
ir_node
*
node
);
/** returns true if node is a Bad node. */
int
is_Bad
(
const
ir_node
*
node
);
/** returns true if the node is not a Block */
...
...
ir/ir/irnode_t.h
View file @
db2f47e7
...
...
@@ -525,6 +525,12 @@ _is_Bad(const ir_node *node) {
return
(
node
&&
_get_irn_op
(
node
)
==
op_Bad
);
}
static
INLINE
int
_is_Const
(
const
ir_node
*
node
)
{
assert
(
node
);
return
(
node
&&
_get_irn_op
(
node
)
==
op_Const
);
}
static
INLINE
int
_is_no_Block
(
const
ir_node
*
node
)
{
assert
(
node
&&
_is_ir_node
(
node
));
...
...
@@ -625,6 +631,7 @@ static INLINE type *_get_irn_type(ir_node *node) {
#define get_irn_link(node) _get_irn_link(node)
#define is_unop(node) _is_unop(node)
#define is_binop(node) _is_binop(node)
#define is_Const(node) _is_Const(node)
#define is_Bad(node) _is_Bad(node)
#define is_no_Block(node) _is_no_Block(node)
#define is_Block(node) _is_Block(node)
...
...
Write
Preview
Supports
Markdown
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