From: Simon Marchi Date: Wed, 17 Dec 2025 15:54:55 +0000 (-0500) Subject: gdb: make create_function_type static X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ed1e0f11389e24d0e4201fc70d4a158e6529fd2;p=thirdparty%2Fbinutils-gdb.git gdb: make create_function_type static It is only used within gdbtypes.c. Change-Id: I3976ca1ec3253c0ade6e7ac71d967d09108d2454 Approved-By: Tom Tromey --- diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 5e073ac873a..5aa85b8800e 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 7f71833650c..0f2e5a0fc13 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); - -/* 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. */ +/* 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. */ + 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,