comments added
[libfirm] / ir / tr / typegmod.h
1
2 # ifndef _TYPEGMOD_H_
3 # define _TYPEGMOD_H_
4
5 # include "type.h"
6
7 /****h* libfirm/typegmod
8  *
9  * NAME
10  *  file typegmod.h
11  * COPYRIGHT
12  *   (C) 2001 by Universitaet Karlsruhe
13  * AUTHORS
14  *   Goetz Lindenmaier
15  * NOTES
16  *  This module supplies routines that support changing the type graph.
17  *****
18  */
19
20 /****f* tpop/exchange_types
21  *
22  * NAME
23  *   exchange_types -- replaces one type by the other.
24  * SYNOPSIS
25  *   void exchange_types(type *old_type, type *new_type);
26  * INPUTS
27  *   The old type that shall be replaced by the new type.
28  * SIDE EFFECTS
29  *   Old type is replaced by new_type.  All references to old_type
30  *   now point to new_type.  The memory for the old type is destroyed,
31  *   but still used.  Therefore it is not freed.
32  *   All referenced to this memory will be lost after a certain while.
33  *   An exception is the list of types in irp (irprog.h).
34  *   In the future there might be a routine to recover the memory, but
35  *   this will be at considerable runtime cost.
36  ***
37  */
38 inline void exchange_types(type *old_type, type *new_type);
39
40 /****f* tpop/skip_tid
41  *
42  * NAME
43  *   skip_tid -- skip id types until a useful type is reached.
44  * SYNOPSIS
45  *   type *skip_tid(type *tp)
46  * INPUTS
47  *   A type of arbitrary kind.
48  * RETURNS
49  *   tp if it is not an id type.
50  *   If tp is an id type retruns the real type it stands for.
51  ***
52  */
53 inline type *skip_tid(type *tp);
54
55 # endif /*_TYPEGMOD_H_ */