6 #include <libfirm/firm_types.h>
14 struct obstack *type_obst;
30 /* note that the constant values represent the rank of the types as defined
33 ATOMIC_TYPE_INVALID = 0,
45 ATOMIC_TYPE_ULONGLONG,
48 ATOMIC_TYPE_LONG_DOUBLE,
50 #ifdef PROVIDE_COMPLEX
51 ATOMIC_TYPE_FLOAT_COMPLEX,
52 ATOMIC_TYPE_DOUBLE_COMPLEX,
53 ATOMIC_TYPE_LONG_DOUBLE_COMPLEX,
54 ATOMIC_TYPE_FLOAT_IMAGINARY,
55 ATOMIC_TYPE_DOUBLE_IMAGINARY,
56 ATOMIC_TYPE_LONG_DOUBLE_IMAGINARY,
61 TYPE_QUALIFIER_NONE = 0,
62 TYPE_QUALIFIER_CONST = 1 << 0,
63 TYPE_QUALIFIER_RESTRICT = 1 << 1,
64 TYPE_QUALIFIER_VOLATILE = 1 << 2,
74 struct atomic_type_t {
76 atomic_type_type_t atype;
79 struct builtin_type_t {
85 struct pointer_type_t {
98 struct function_parameter_t {
100 function_parameter_t *next;
103 struct function_type_t {
106 function_parameter_t *parameters;
108 bool unspecified_parameters;
111 struct compound_type_t {
113 /** the declaration of the compound type, its context field
114 * contains the compound entries. */
115 declaration_t *declaration;
120 /** the declaration of the enum type. You can find the enum entries by
121 * walking the declaration->next list until you don't find
122 * STORAGE_CLASS_ENUM_ENTRY declarations anymore */
123 declaration_t *declaration;
126 struct typedef_type_t {
128 declaration_t *declaration;
129 type_t *resolved_type;
132 struct typeof_type_t {
134 expression_t *expression;
136 type_t *resolved_type;
139 type_t *make_atomic_type(atomic_type_type_t type, type_qualifier_t qualifiers);
140 type_t *make_pointer_type(type_t *points_to, type_qualifier_t qualifiers);