arg->stack_ent = copy_entity_own(val_ent, res);
set_entity_link(val_ent, arg->stack_ent);
set_entity_link(arg->stack_ent, NULL);
- /* must be automatic to set a fixed layout */
- set_entity_allocation(arg->stack_ent, allocation_automatic);
} else {
/* create a new entity */
snprintf(buf, sizeof(buf), "param_%d", i);
argument_ent = copy_entity_own(ent, frame_tp);
/* must be automatic to set a fixed layout */
- set_entity_allocation(argument_ent, allocation_automatic);
set_entity_offset(argument_ent, offset);
offset += get_type_size_bytes(tp);
set_entity_owner(ent, frame_tp);
add_class_member(frame_tp, ent);
/* must be automatic to set a fixed layout */
- set_entity_allocation(ent, allocation_automatic);
set_entity_offset(ent, offset);
offset += get_type_size_bytes(tp);
}
if (! is_method_entity(ent))
continue;
- if (get_entity_peculiarity(ent) == peculiarity_description)
+
+ irg = get_entity_irg(ent);
+ if (irg == NULL)
continue;
/*
*/
ctx->static_link_pos = 0;
- irg = get_entity_irg(ent);
irg_walk_graph(irg, NULL, update_outer_frame_sels, ctx);
}
}
ir_type *parent = be->pic_trampolines_type;
ir_entity *ent = new_entity(parent, old_id, type);
set_entity_ld_ident(ent, id);
- set_entity_visibility(ent, visibility_local);
- set_entity_variability(ent, variability_uninitialized);
+ set_entity_visibility(ent, ir_visibility_local);
return ent;
}
ir_type *parent = be->pic_symbols_type;
ir_entity *ent = new_entity(parent, old_id, type);
set_entity_ld_ident(ent, id);
- set_entity_visibility(ent, visibility_local);
- set_entity_variability(ent, variability_uninitialized);
+ set_entity_visibility(ent, ir_visibility_local);
return ent;
}
*/
static int can_address_relative(ir_entity *entity)
{
- return get_entity_visibility(entity) != visibility_external_allocated;
+ return get_entity_visibility(entity) != ir_visibility_external
+ && !(get_entity_linkage(entity) & IR_LINKAGE_MERGE);
}
/** patches SymConsts to work in position independent code */
frame_tp = get_irg_frame_type(irg);
for (i = get_class_n_members(frame_tp) - 1; i >= 0; --i) {
ir_entity *ent = get_class_member(frame_tp, i);
+ ir_graph *irg = get_entity_irg(ent);
- if (is_method_entity(ent) && get_entity_peculiarity(ent) != peculiarity_description) {
- ir_graph *irg = get_entity_irg(ent);
-
+ if (irg != NULL) {
irg_walk_graph(irg, NULL, lower_outer_frame_sels, env);
}
}