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_NONE = 0,
64 TYPE_QUALIFIER_CONST = 1 << 0,
65 TYPE_QUALIFIER_RESTRICT = 1 << 1,
66 TYPE_QUALIFIER_VOLATILE = 1 << 2,
71 type_qualifier_t qualifiers;
76 struct atomic_type_t {
78 atomic_type_type_t atype;
81 struct builtin_type_t {
87 struct pointer_type_t {
100 struct function_parameter_t {
102 function_parameter_t *next;
105 struct function_type_t {
108 function_parameter_t *parameters;
110 bool unspecified_parameters;
113 struct compound_type_t {
115 /** the declaration of the compound type, it's context field
116 * contains the compound entries. */
117 declaration_t *declaration;
122 /** the declaration of the enum type. You can find the enum entries by
123 * walking the declaration->context_next list until you don't find
124 * STORAGE_CLASS_ENUM_ENTRY declarations anymore */
125 declaration_t *declaration;
128 struct typedef_type_t {
130 declaration_t *declaration;
133 struct typeof_type_t {
135 expression_t *expression;
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);