From d0c9791728caa0d3b3270a997c7fd97919976c97 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 31 Jan 2023 07:52:09 -0700 Subject: Turn value_type into method This changes value_type to be a method of value. Much of this patch was written by script. Approved-By: Simon Marchi --- gdb/infcall.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gdb/infcall.c') diff --git a/gdb/infcall.c b/gdb/infcall.c index 4c2a4e4..b58dc20 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -181,7 +181,7 @@ value_arg_coerce (struct gdbarch *gdbarch, struct value *arg, struct type *param_type, int is_prototyped) { const struct builtin_type *builtin = builtin_type (gdbarch); - struct type *arg_type = check_typedef (value_type (arg)); + struct type *arg_type = check_typedef (arg->type ()); struct type *type = param_type ? check_typedef (param_type) : arg_type; @@ -278,7 +278,7 @@ find_function_addr (struct value *function, struct type **retval_type, struct type **function_type) { - struct type *ftype = check_typedef (value_type (function)); + struct type *ftype = check_typedef (function->type ()); struct gdbarch *gdbarch = ftype->arch (); struct type *value_type = NULL; /* Initialize it just to avoid a GCC false warning. */ @@ -972,7 +972,7 @@ call_function_by_hand_dummy (struct value *function, else { gdb_assert (sp <= lastval_addr); - sp = lastval_addr + value_type (lastval)->length (); + sp = lastval_addr + lastval->type ()->length (); } if (gdbarch_frame_align_p (gdbarch)) -- cgit v1.1