[1/7] gdb: make create_function_type static

Message ID 20251217155550.37654-2-simon.marchi@efficios.com
State New
Headers
Series gdbtypes cleanups |

Commit Message

Simon Marchi Dec. 17, 2025, 3:54 p.m. UTC
  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(-)
  

Patch

diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 975e1246a0df..96d5e0c425a6 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -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,
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index 3ae5a1ef4841..ebacb30b847e 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -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,