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 <simon.marchi@efficios.com>
This commit is contained in:
Tom Tromey
2023-01-31 07:52:09 -07:00
parent 7cf57bc5be
commit d0c9791728
107 changed files with 880 additions and 884 deletions

View File

@ -42,7 +42,7 @@ eval_op_m2_high (struct type *expect_type, struct expression *exp,
else
{
arg1 = coerce_ref (arg1);
struct type *type = check_typedef (value_type (arg1));
struct type *type = check_typedef (arg1->type ());
if (m2_is_unbounded_array (type))
{
@ -54,7 +54,7 @@ eval_op_m2_high (struct type *expect_type, struct expression *exp,
_("unbounded structure "
"missing _m2_high field"));
if (value_type (arg1) != type)
if (arg1->type () != type)
arg1 = value_cast (type, arg1);
}
}
@ -73,7 +73,7 @@ eval_op_m2_subscript (struct type *expect_type, struct expression *exp,
then report this as an error. */
arg1 = coerce_ref (arg1);
struct type *type = check_typedef (value_type (arg1));
struct type *type = check_typedef (arg1->type ());
if (m2_is_unbounded_array (type))
{
@ -87,10 +87,10 @@ eval_op_m2_subscript (struct type *expect_type, struct expression *exp,
_("unbounded structure "
"missing _m2_contents field"));
if (value_type (arg1) != type)
if (arg1->type () != type)
arg1 = value_cast (type, arg1);
check_typedef (value_type (arg1));
check_typedef (arg1->type ());
return value_ind (value_ptradd (arg1, value_as_long (arg2)));
}
else