Commit 13317161 authored by Matthias Braun's avatar Matthias Braun
Browse files

sparc/arm: Fix duplicate entities by using create_compilerlib_entity()

parent aed38c30
...@@ -116,12 +116,8 @@ static ir_entity *make_divmod(char const *const name, ir_type *const even, ir_ty ...@@ -116,12 +116,8 @@ static ir_entity *make_divmod(char const *const name, ir_type *const even, ir_ty
set_method_res_type(mtp, 2, even); set_method_res_type(mtp, 2, even);
set_method_res_type(mtp, 3, odd); set_method_res_type(mtp, 3, odd);
ident *const id = new_id_from_str(name); ident *const id = new_id_from_str(name);
ir_type *const glob = get_glob_type(); return create_compilerlib_entity(id, mtp);
ir_entity *const ent = new_global_entity(glob, id, mtp,
ir_visibility_external,
IR_LINKAGE_DEFAULT);
return ent;
} }
static void create_divmod_intrinsics(ir_mode *mode_unsigned, static void create_divmod_intrinsics(ir_mode *mode_unsigned,
......
...@@ -116,12 +116,9 @@ static ir_entity *create_64_intrinsic_fkt(ir_type *method, const ir_op *op, ...@@ -116,12 +116,9 @@ static ir_entity *create_64_intrinsic_fkt(ir_type *method, const ir_op *op,
} else { } else {
panic("cannot lower unexpected 64bit operation %s", get_op_name(op)); panic("cannot lower unexpected 64bit operation %s", get_op_name(op));
} }
ident *id = new_id_from_str(name);
ir_type *glob = get_glob_type(); ident *const id = new_id_from_str(name);
ir_entity *result = new_global_entity(glob, id, method, return create_compilerlib_entity(id, method);
ir_visibility_external,
IR_LINKAGE_DEFAULT);
return result;
} }
void sparc_lower_64bit(void) void sparc_lower_64bit(void)
......
Supports Markdown
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