diff options
Diffstat (limited to 'gdb/eval.c')
-rw-r--r-- | gdb/eval.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/gdb/eval.c b/gdb/eval.c index 09564498975..5d758d1ad07 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -1674,13 +1674,7 @@ evaluate_subexp_standard (struct type *expect_type, func_name = (char *) alloca (name_len + 1); strcpy (func_name, &exp->elts[string_pc + 1].string); - /* Prepare list of argument types for overload resolution. */ - arg_types = (struct type **) - alloca (nargs * (sizeof (struct type *))); - for (ix = 1; ix <= nargs; ix++) - arg_types[ix - 1] = value_type (argvec[ix]); - - find_overload_match (arg_types, nargs, func_name, + find_overload_match (&argvec[1], nargs, func_name, NON_METHOD, /* not method */ 0, /* strict match */ NULL, NULL, /* pass NULL symbol since @@ -1716,13 +1710,7 @@ evaluate_subexp_standard (struct type *expect_type, evaluation. */ struct value *valp = NULL; - /* Prepare list of argument types for overload resolution. */ - arg_types = (struct type **) - alloca (nargs * (sizeof (struct type *))); - for (ix = 1; ix <= nargs; ix++) - arg_types[ix - 1] = value_type (argvec[ix]); - - (void) find_overload_match (arg_types, nargs, tstr, + (void) find_overload_match (&argvec[1], nargs, tstr, METHOD, /* method */ 0, /* strict match */ &arg2, /* the object */ @@ -1793,13 +1781,7 @@ evaluate_subexp_standard (struct type *expect_type, if (op == OP_VAR_VALUE) function = exp->elts[save_pos1+2].symbol; - /* Prepare list of argument types for overload resolution. */ - arg_types = (struct type **) - alloca (nargs * (sizeof (struct type *))); - for (ix = 1; ix <= nargs; ix++) - arg_types[ix - 1] = value_type (argvec[ix]); - - (void) find_overload_match (arg_types, nargs, + (void) find_overload_match (&argvec[1], nargs, NULL, /* no need for name */ NON_METHOD, /* not method */ 0, /* strict match */ |