X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Ftr%2Ftypegmod.c;h=642ef66e042d4b7f8c13eba6df09c6434f8cf3fe;hb=3d344e21b632786c6c5ccc6c2bdaee07484a9fb6;hp=572dea31a80262e6165f5733128fb8ff38491d9b;hpb=1ce363f80e6a204d4011f85813362d9bd1d0e7e4;p=libfirm diff --git a/ir/tr/typegmod.c b/ir/tr/typegmod.c index 572dea31a..642ef66e0 100644 --- a/ir/tr/typegmod.c +++ b/ir/tr/typegmod.c @@ -23,16 +23,14 @@ * @author Goetz Lindenmaier, Michael Beck * @version $Id$ */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "type_t.h" #include "tpop_t.h" #include "irmode.h" void exchange_types(ir_type *old_type, ir_type *new_type) { - unsigned flags = old_type->flags & (tf_frame_type | tf_value_param_type | tf_global_type | tf_tls_type); + unsigned flags = old_type->flags & ~(tf_lowered_type | tf_layout_fixed); /* Deallocate datastructures not directly contained in the old type. We must do this now as it is the latest point where we know the original kind of type. @@ -53,7 +51,7 @@ void exchange_types(ir_type *old_type, ir_type *new_type) { /* Exchange the types */ old_type->type_op = type_id; - old_type->mode = (ir_mode *) new_type; + old_type->assoc_type = new_type; /* ensure that the frame, value param, global and tls flags are set right if these types are exchanged */ new_type->flags |= flags; @@ -62,6 +60,6 @@ void exchange_types(ir_type *old_type, ir_type *new_type) { ir_type *skip_tid(ir_type *tp) { /* @@@ implement the self cycle killing trick of skip_id(ir_node *) */ while (tp->type_op == type_id) - tp = (ir_type *) tp->mode; + tp = tp->assoc_type; return tp; }