Commit ac49539a authored by Moritz Kroll's avatar Moritz Kroll
Browse files

irio: Fixed importing entities with atomic values

[r25522]
parent 69af9c35
......@@ -1298,6 +1298,8 @@ int is_IJmp(const ir_node *node);
int is_Raise(const ir_node *node);
/** Returns true if a node is an ASM node. */
int is_ASM(const ir_node *node);
/** Returns true if a node is an Dummy node. */
int is_Dummy(const ir_node *node);
/** Returns true if node is a Proj node or a Filter node in INTRA-procedural view. */
int is_Proj(const ir_node *node);
/** Returns true if node is a Filter node. */
......
......@@ -2955,6 +2955,12 @@ int
return _is_ASM(node);
}
/* returns true if a node is an Dummy node. */
int
(is_Dummy)(const ir_node *node) {
return _is_Dummy(node);
}
int
(is_Proj)(const ir_node *node) {
return _is_Proj(node);
......
......@@ -753,6 +753,12 @@ _is_ASM(const ir_node *node) {
return (_get_irn_op(node) == op_ASM);
}
static inline int
_is_Dummy(const ir_node *node) {
assert(node);
return (_get_irn_op(node) == op_Dummy);
}
static inline int
_is_Anchor(const ir_node *node) {
return (_get_irn_op(node) == op_Anchor);
......@@ -1065,6 +1071,7 @@ _is_arg_Proj(const ir_node *node) {
#define is_IJmp(node) _is_IJmp(node)
#define is_Raise(node) _is_Raise(node)
#define is_ASM(node) _is_ASM(node)
#define is_Dummy(node) _is_Dummy(node)
#define is_Anchor(node) _is_Anchor(node)
#define is_Bad(node) _is_Bad(node)
#define is_NoMem(node) _is_NoMem(node)
......
......@@ -597,7 +597,7 @@ set_atomic_ent_value(ir_entity *ent, ir_node *val) {
assert(is_atomic_entity(ent) && (ent->variability != variability_uninitialized));
if (is_Method_type(ent->type) && (ent->peculiarity == peculiarity_existent))
return;
assert(get_irn_mode(val) == get_type_mode(ent->type));
assert(is_Dummy(val) || get_irn_mode(val) == get_type_mode(ent->type));
ent->value = val;
} /* set_atomic_ent_value */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment