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
288b414e
Commit
288b414e
authored
Jun 18, 2009
by
Matthias Braun
Browse files
fix wrong assert, expor copy_node_attr function to public API
[r26153]
parent
1a68ac34
Changes
4
Hide whitespace changes
Inline
Side-by-side
include/libfirm/irnode.h
View file @
288b414e
...
...
@@ -1355,6 +1355,12 @@ ir_mode *get_divop_resmod(const ir_node *node);
* operation: Cond. */
int
is_irn_forking
(
const
ir_node
*
node
);
/**
* Copies all attributes stored in the old node to the new node.
* Assumes both have the same opcode and sufficient size.
*/
void
copy_node_attr
(
const
ir_node
*
old_node
,
ir_node
*
new_node
);
/** Return the type associated with the value produced by n
* if the node remarks this type as it is the case for
* Cast, Const, SymConst and some Proj nodes or unknown_type. */
...
...
ir/ir/irgraph_t.h
View file @
288b414e
...
...
@@ -250,7 +250,7 @@ _set_irg_current_block(ir_graph *irg, ir_node *node) {
static
inline
ir_entity
*
_get_irg_entity
(
const
ir_graph
*
irg
)
{
assert
(
irg
&&
irg
->
ent
);
assert
(
irg
);
return
irg
->
ent
;
}
...
...
ir/ir/irnode.c
View file @
288b414e
...
...
@@ -2769,6 +2769,10 @@ int (is_irn_forking)(const ir_node *node) {
return
_is_irn_forking
(
node
);
}
void
(
copy_node_attr
)(
const
ir_node
*
old_node
,
ir_node
*
new_node
)
{
return
_copy_node_attr
(
old_node
,
new_node
);
}
/* Return the type associated with the value produced by n
* if the node remarks this type as it is the case for
* Cast, Const, SymConst and some Proj nodes. */
...
...
ir/ir/irnode_t.h
View file @
288b414e
...
...
@@ -140,7 +140,7 @@ _set_irn_op(ir_node *node, ir_op *op) {
/** Copies all attributes stored in the old node to the new node.
Assumes both have the same opcode and sufficient size. */
static
inline
void
copy_node_attr
(
const
ir_node
*
old_node
,
ir_node
*
new_node
)
{
_
copy_node_attr
(
const
ir_node
*
old_node
,
ir_node
*
new_node
)
{
ir_op
*
op
=
_get_irn_op
(
old_node
);
/* must always exist */
...
...
@@ -741,6 +741,7 @@ _is_arg_Proj(const ir_node *node) {
#define is_Const_one(node) _is_Const_one(node)
#define is_Const_all_one(node) _is_Const_all_one(node)
#define is_irn_forking(node) _is_irn_forking(node)
#define copy_node_attr(oldn,newn) _copy_node_attr(oldn,newn)
#define get_irn_type(node) _get_irn_type(node)
#define get_irn_type_attr(node) _get_irn_type_attr(node)
#define get_irn_entity_attr(node) _get_irn_entity_attr(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