Remove duplicate allocate_parameter().
authorChristoph Mallon <christoph.mallon@gmx.de>
Fri, 24 Jun 2011 05:53:58 +0000 (07:53 +0200)
committerChristoph Mallon <christoph.mallon@gmx.de>
Fri, 24 Jun 2011 05:53:58 +0000 (07:53 +0200)
parser.c
type.c
type_t.h

index 5754fe3..f14a3f1 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -404,15 +404,6 @@ static statement_t *create_empty_statement(void)
        return allocate_statement_zero(STATEMENT_EMPTY);
 }
 
-static function_parameter_t *allocate_parameter(type_t *const type)
-{
-       function_parameter_t *const param
-               = obstack_alloc(type_obst, sizeof(*param));
-       memset(param, 0, sizeof(*param));
-       param->type = type;
-       return param;
-}
-
 /**
  * Returns the size of an initializer node.
  *
diff --git a/type.c b/type.c
index 46053aa..e7a6513 100644 (file)
--- a/type.c
+++ b/type.c
@@ -1818,7 +1818,7 @@ void layout_union_type(compound_type_t *type)
        compound->alignment = alignment;
 }
 
-static function_parameter_t *allocate_parameter(type_t *const type)
+function_parameter_t *allocate_parameter(type_t *const type)
 {
        function_parameter_t *const param
                = obstack_alloc(type_obst, sizeof(*param));
index a2ccb37..555f53a 100644 (file)
--- a/type_t.h
+++ b/type_t.h
@@ -205,6 +205,7 @@ type_t *make_based_pointer_type(type_t *points_to,
                                                                type_qualifiers_t qualifiers, variable_t *variable);
 type_t *make_array_type(type_t *element_type, size_t size,
                         type_qualifiers_t qualifiers);
+function_parameter_t *allocate_parameter(type_t*);
 
 type_t *duplicate_type(const type_t *type);
 type_t *identify_new_type(type_t *type);