more work on local variable support
[cparser] / type_t.h
index 17b90e1..efc97b6 100644 (file)
--- a/type_t.h
+++ b/type_t.h
@@ -3,6 +3,8 @@
 
 #include <stdbool.h>
 
+#include <libfirm/firm_types.h>
+
 #include "type.h"
 #include "symbol.h"
 #include "token_t.h"
@@ -17,7 +19,7 @@ typedef enum {
        TYPE_COMPOUND_STRUCT,
        TYPE_COMPOUND_UNION,
        TYPE_ENUM,
-       TYPE_METHOD,
+       TYPE_FUNCTION,
        TYPE_POINTER,
        TYPE_ARRAY,
        TYPE_BUILTIN,
@@ -65,6 +67,8 @@ typedef enum {
 struct type_t {
        type_type_t       type;
        type_qualifier_t  qualifiers;
+
+       ir_type          *firm_type;
 };
 
 struct atomic_type_t {
@@ -75,6 +79,7 @@ struct atomic_type_t {
 struct builtin_type_t {
        type_t    type;
        symbol_t *symbol;
+       type_t   *real_type;
 };
 
 struct pointer_type_t {
@@ -90,17 +95,17 @@ struct array_type_t {
        expression_t *size;
 };
 
-struct method_parameter_t {
-       type_t             *type;
-       method_parameter_t *next;
+struct function_parameter_t {
+       type_t               *type;
+       function_parameter_t *next;
 };
 
-struct method_type_t {
-       type_t              type;
-       type_t             *result_type;
-       method_parameter_t *parameters;
-       bool                variadic;
-       bool                unspecified_parameters;
+struct function_type_t {
+       type_t               type;
+       type_t              *result_type;
+       function_parameter_t *parameters;
+       bool                 variadic;
+       bool                 unspecified_parameters;
 };
 
 struct compound_type_t {