*/
assert (get_entity_peculiarity(ent) == peculiarity_description);
}
- else if (get_opt_optimize() && get_opt_closed_world() && get_opt_dyn_meth_dispatch() &&
+ else if (get_opt_closed_world() && get_opt_dyn_meth_dispatch() &&
(ARR_LEN(arr) == 1 && arr[0] != NULL)) {
ir_node *new_node;
/* let's check if it's the address of a function */
n = get_atomic_ent_value(ent);
- if (get_irn_op(n) == op_SymConst) {
- if (get_SymConst_kind(n) == symconst_addr_ent) {
- ent = get_SymConst_entity(n);
+ if (is_SymConst(n) && get_SymConst_kind(n) == symconst_addr_ent) {
+ ent = get_SymConst_entity(n);
- if (is_Method_type(get_entity_type(ent)))
- eset_insert(set, ent);
- }
+ if (is_Method_type(get_entity_type(ent)))
+ eset_insert(set, ent);
}
} else {
for (i = get_compound_ent_n_values(ent) - 1; i >= 0; --i) {
n = get_compound_ent_value(ent, i);
/* let's check if it's the address of a function */
- if (get_irn_op(n) == op_SymConst) {
- if (get_SymConst_kind(n) == symconst_addr_ent) {
- ir_entity *ent = get_SymConst_entity(n);
+ if (is_SymConst(n) && get_SymConst_kind(n) == symconst_addr_ent) {
+ ir_entity *ent = get_SymConst_entity(n);
- if (is_Method_type(get_entity_type(ent)))
- eset_insert(set, ent);
- }
+ if (is_Method_type(get_entity_type(ent)))
+ eset_insert(set, ent);
}
}
}
}
}
- /* insert all methods the initializes global variables */
+ /* insert all methods that are used in global variables initializers */
glob = get_glob_type();
for (i = get_class_n_members(glob) - 1; i >= 0; --i) {
ent = get_class_member(glob, i);