mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user