X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Ftr%2Ftype_t.h;h=e61a951bb2d3c6b92b108679f373b4310dc1a5d4;hb=fe7ff338c74dd5d0ebdc2ebc13e905dc40ebfc86;hp=6a70e0cc36eff15199e59c9b51951fb015156405;hpb=eebab16e6be8c73ebb7cb01d04567136f36b7337;p=libfirm diff --git a/ir/tr/type_t.h b/ir/tr/type_t.h index 6a70e0cc3..e61a951bb 100644 --- a/ir/tr/type_t.h +++ b/ir/tr/type_t.h @@ -313,15 +313,12 @@ static inline int is_lowered_type(const ir_type *tp) return tp->flags & tf_lowered_type; } -static inline ir_type *get_type_unlowered(const ir_type *tp) -{ - assert (is_lowered_type(tp)); - return tp->assoc_type; -} - -static inline ir_type *get_type_lowered(const ir_type *tp) +/** + * Gets the lowered/unlowered type of a type or NULL if this type + * has no lowered/unlowered one. + */ +static inline ir_type *get_associated_type(const ir_type *tp) { - assert (tp->assoc_type == NULL || is_lowered_type(tp->assoc_type)); return tp->assoc_type; } @@ -329,10 +326,6 @@ static inline void set_lowered_type(ir_type *tp, ir_type *lowered_type) { assert (is_type(tp) && is_type(lowered_type)); lowered_type->flags |= tf_lowered_type; - /* there might be a chain of lowerings, get to the start */ - while (is_lowered_type(tp)) { - tp = tp->assoc_type; - } tp->assoc_type = lowered_type; lowered_type->assoc_type = tp; }