Changed void * into char * for offset calculations to make things portable
[libfirm] / ir / tr / typegmod.h
1
2 /* $Id$ */
3
4 # ifndef _TYPEGMOD_H_
5 # define _TYPEGMOD_H_
6
7 # include "type.h"
8
9 /**
10  *
11  *  file typegmod.h
12  *   (C) 2001 by Universitaet Karlsruhe
13  *   Goetz Lindenmaier
14  *  This module supplies routines that support changing the type graph.
15  */
16
17 /**
18  *
19  *   - replaces one type by the other.
20  *   @param The old type that shall be replaced by the new type.
21  *   Old type is replaced by new_type.  All references to old_type
22  *   now point to new_type.  The memory for the old type is destroyed,
23  *   but still used.  Therefore it is not freed.
24  *   All referenced to this memory will be lost after a certain while.
25  *   An exception is the list of types in irp (irprog.h).
26  *   In the future there might be a routine to recover the memory, but
27  *   this will be at considerable runtime cost.
28  *
29  */
30 INLINE void exchange_types(type *old_type, type *new_type);
31
32 /**
33  *
34  *   - skip id types until a useful type is reached.
35  *   @param A type of arbitrary kind.
36  *   tp if it is not an id type.
37  *   If tp is an id type retruns the real type it stands for.
38  *
39  */
40 INLINE type *skip_tid(type *tp);
41
42 # endif /*_TYPEGMOD_H_ */