Avoiding more warnings.
[libfirm] / ir / tr / tpop_t.h
1
2 /* $Id$ */
3
4 # ifndef _TPOP_T_H_
5 # define _TPOP_T_H_
6
7 # include <stddef.h>
8 # include "tpop.h"
9 /****h* libfirm/tpop_t.h
10  *
11  * NAME
12  *   file tpop_t.h
13  * COPYRIGHT
14  *   (C) 2001 by Universitaet Karlsruhe
15  * AUTHORS
16  *   Goetz Lindenmaier
17  * NOTES
18  *   This file contains the datatypes hidden in tpop.h.
19  * SEE ALSO
20  *   tpop.h
21  *****
22  */
23
24 struct tp_op {
25   tp_opcode code;
26   ident *name;
27   size_t attr_size;
28 };
29
30 /****f* tpop/new_tpop
31  *
32  * NAME
33  *   new_tpop - Returns a new type opcode.
34  * NOTE
35  *   Allocates a new tp_op struct and initializes it's fields with
36  *   the passed values.  This function is only to be used during
37  *   initialization of the library.
38  * SYNOPSIS
39  *   tp_op * new_tpop (tp_opcode code, ident *name, size_t attr_size);
40  * INPUTS
41  *   code      - the enum for this type opcode.
42  *   name      - an ident for the name of the type opcode.
43  *   attr_size - the size of the attributes necessary for a type with
44  *               this opcode
45  * RESULT
46  *   A new type opcode.
47  ***
48  */
49 tp_op * new_tpop (tp_opcode code, ident *name, size_t attr_size);
50
51 /****f* tpop/new_tpop
52  *
53  * NAME
54  *   init_tpop - Initialize the tpop module.
55  * NOTE
56  *   Must be called during the initizlization of the library. Allocates
57  *   opcodes and sets the globals that are external visible as specified
58  *   in tpop.h.
59  * SYNOPSIS
60  *   void init_tpop (void);
61  * INPUTS
62  * RESULT
63  * SIDE EFFECTS
64  *   Allocates opcodes for classes, struct, method, union, array,
65  *   enumeration, pointer and primitive and sets the according values.
66  ***
67  */
68 void init_tpop (void);
69
70 /****f* tpop/get_tpop_attr_size
71  *
72  * NAME
73  *   get_tpop_attr_size - Returns the size of the attribute to this kind
74  *   of type.
75  * NOTE
76  *   Internal feature.
77  * SYNOPSIS
78  *   int get_tpop_attr_size (tp_op *op)
79  * INPUTS
80  *   op - The type opcode to get the size for.
81  * RESULT
82  *   The size of the attribute of types with this opcode.
83  * SIDE EFFECTS
84  ***
85  */
86 int get_tpop_attr_size (tp_op *op);
87
88 #endif /* _TPOP_T_H_ */