Remove gdbarch parameter of lookup_typename

I noticed that the gdbarch parameter of lookup_typename was unused, so I
removed it (as well as from lookup_signed_typename and
lookup_unsigned_typename) and updated all callers.

Tested by rebuilding.

gdb/ChangeLog:

	* c-exp.y: Update calls to lookup_typename,
	lookup_signed_typename and lookup_unsigned_typename.
	* c-lang.c (evaluate_subexp_c): Likewise.
	* cp-namespace.c (cp_lookup_symbol_imports_or_template):
	Likewise.
	* eval.c (binop_promote): Likewise.
	* gdbtypes.c (lookup_typename): Remove gdbarch parameter.
	(lookup_unsigned_typename): Likewise.
	(lookup_signed_typename): Likewise.
	* gdbtypes.h (lookup_unsigned_typename): Likewise.
	(lookup_signed_typename): Likewise.
	(lookup_typename): Likewise.
	* guile/scm-type.c (tyscm_lookup_typename): Update calls to
	lookup_typename, lookup_signed_typename,
	lookup_unsigned_typename.
	* m2-exp.y: Likewise.
	* printcmd.c (printf_wide_c_string): Likewise.
	(ui_printf): Likewise.
	* python/py-type.c (typy_lookup_typename): Likewise.
	* python/py-xmethods.c (python_xmethod_worker::invoke):
	Likewise.
	* rust-exp.y: Likewise.
This commit is contained in:
Simon Marchi
2019-12-05 13:44:30 -05:00
committed by Simon Marchi
parent a23e9ba17f
commit b858499daf
13 changed files with 51 additions and 69 deletions

View File

@@ -2326,7 +2326,7 @@ printf_wide_c_string (struct ui_file *stream, const char *format,
const gdb_byte *str;
size_t len;
struct gdbarch *gdbarch = get_type_arch (value_type (value));
struct type *wctype = lookup_typename (current_language, gdbarch,
struct type *wctype = lookup_typename (current_language,
"wchar_t", NULL, 0);
int wcwidth = TYPE_LENGTH (wctype);
@@ -2601,7 +2601,7 @@ ui_printf (const char *arg, struct ui_file *stream)
{
struct gdbarch *gdbarch
= get_type_arch (value_type (val_args[i]));
struct type *wctype = lookup_typename (current_language, gdbarch,
struct type *wctype = lookup_typename (current_language,
"wchar_t", NULL, 0);
struct type *valtype;
const gdb_byte *bytes;