summaryrefslogtreecommitdiffhomepage
path: root/ir/tr
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2016-12-20 20:51:18 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2016-12-22 21:23:17 +0100
commitc920ed472c31ef03a7088a181116504d9cbecded (patch)
treeeb60919f23e61bb55b9d2d3a2de89b36ec7daca4 /ir/tr
parent394a85e0fdf1c4098331810f1767a784a9c570e0 (diff)
tr: Do not set pointer-mode-like attributes for new method types.
Methods are not pointers, so using mode_P and its size do not make sense.
Diffstat (limited to 'ir/tr')
-rw-r--r--ir/tr/type.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ir/tr/type.c b/ir/tr/type.c
index 1fd65bd..011f865 100644
--- a/ir/tr/type.c
+++ b/ir/tr/type.c
@@ -521,9 +521,8 @@ int (is_Struct_type)(const ir_type *strct)
ir_type *new_type_method(size_t const n_param, size_t const n_res, int const is_variadic, unsigned const cc_mask, mtp_additional_properties const property_mask)
{
- ir_type *res = new_type(tpo_method, sizeof(method_attr), mode_P);
+ ir_type *const res = new_type(tpo_method, sizeof(method_attr), NULL);
res->flags |= tf_layout_fixed;
- res->size = get_mode_size_bytes(mode_P);
res->attr.method.n_params = n_param;
res->attr.method.params = XMALLOCNZ(ir_type*, n_param);
res->attr.method.n_res = n_res;