Commit 7a13c436 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

cleanup: Do not re-fetch values, which we have already.

parent 0aec06e4
......@@ -253,7 +253,7 @@ static ir_entity *find_constant_entity(ir_node *ptr)
ir_type *tp = get_entity_owner(ent);
/* Do not fiddle with polymorphism. */
if (is_Class_type(get_entity_owner(ent)) &&
if (is_Class_type(tp) &&
((get_entity_n_overwrites(ent) != 0) ||
(get_entity_n_overwrittenby(ent) != 0) ) )
return NULL;
......
......@@ -544,7 +544,7 @@ static ir_entity *find_constant_entity(ir_node *ptr)
ir_type *tp = get_entity_owner(ent);
/* Do not fiddle with polymorphism. */
if (is_Class_type(get_entity_owner(ent)) &&
if (is_Class_type(tp) &&
((get_entity_n_overwrites(ent) != 0) ||
(get_entity_n_overwrittenby(ent) != 0) ) )
return NULL;
......
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