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,
55 #ifdef PROVIDE_IMAGINARY
56 ATOMIC_TYPE_FLOAT_IMAGINARY,
57 ATOMIC_TYPE_DOUBLE_IMAGINARY,
58 ATOMIC_TYPE_LONG_DOUBLE_IMAGINARY,
63 TYPE_QUALIFIER_CONST = 1 << 0,
64 TYPE_QUALIFIER_RESTRICT = 1 << 1,
65 TYPE_QUALIFIER_VOLATILE = 1 << 2,
70 type_qualifier_t qualifiers;
75 struct atomic_type_t {
77 atomic_type_type_t atype;
80 struct builtin_type_t {
86 struct pointer_type_t {
99 struct function_parameter_t {
101 function_parameter_t *next;
104 struct function_type_t {
107 function_parameter_t *parameters;
109 bool unspecified_parameters;
112 struct compound_type_t {
114 /** the declaration of the compound type, it's context field
115 * contains the compound entries. */
116 declaration_t *declaration;
121 /** the declaration of the enum type. You can find the enum entries by
122 * walking the declaration->context_next list until you don't find
123 * STORAGE_CLASS_ENUM_ENTRY declarations anymore */
124 declaration_t *declaration;
127 struct typedef_type_t {
129 declaration_t *declaration;
132 struct typeof_type_t {
134 expression_t *expression;
138 type_t *make_atomic_type(atomic_type_type_t type, type_qualifier_t qualifiers);
139 type_t *make_pointer_type(type_t *points_to, type_qualifier_t qualifiers);