[1/7] gdb: make create_function_type static
Commit Message
From: Simon Marchi <simon.marchi@polymtl.ca>
It is only used within gdbtypes.c.
Change-Id: I3976ca1ec3253c0ade6e7ac71d967d09108d2454
---
gdb/gdbtypes.c | 6 ++++--
gdb/gdbtypes.h | 22 ++++++++++------------
2 files changed, 14 insertions(+), 14 deletions(-)
@@ -560,9 +560,11 @@ make_function_type (struct type *type, struct type **typeptr)
return ntype;
}
-/* See gdbtypes.h. */
+/* Given a return type and argument types, create new function type.
+ If the final type in PARAM_TYPES is NULL, create a varargs function.
+ New type is allocated using ALLOC. */
-struct type *
+static struct type *
create_function_type (type_allocator &alloc,
struct type *return_type,
int nparams,
@@ -2517,21 +2517,19 @@ extern struct type *lookup_pointer_type (struct type *);
extern struct type *make_function_type (struct type *, struct type **);
-/* Given a return type and argument types, create new function type.
- If the final type in PARAM_TYPES is NULL, create a varargs function.
- New type is allocated using ALLOC. */
-extern struct type *create_function_type (type_allocator &alloc,
- struct type *return_type,
- int nparams,
- struct type **param_types);
+/* Create a new function type with return type RETURN_TYPE and unspecified
+ number and types of parameters.
+
+ The new function type has the same owner as RETURN_TYPE. */
-/* Like create_function_type, but allocate the new function type at
- the same obstack as RETURN_TYPE and with unspecified number of
- parameters and their types. */
extern struct type *lookup_function_type (struct type *return_type);
-/* Like create_function_type, but allocate the new function type at
- the same obstack as RETURN_TYPE. */
+/* Create a new function type with return type RETURN_TYPE and NPARAMS parameter
+ of types PARAM_TYPES. If the final type in PARAM_TYPES is nullptr, create a
+ varargs function.
+
+ The new function type has the same owner as RETURN_TYPE. */
+
extern struct type *lookup_function_type_with_arguments
(struct type *return_type,
int nparams,