summaryrefslogtreecommitdiff
path: root/gdb/m2-lang.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-31 07:52:09 -0700
committerTom Tromey <tom@tromey.com>2023-02-13 15:21:06 -0700
commitd0c9791728caa0d3b3270a997c7fd97919976c97 (patch)
tree1753b7232efa89e05696d4289d60ad019fc161e4 /gdb/m2-lang.c
parent7cf57bc5be656c62cc6b80280a9eddad2b8ded3f (diff)
downloadbinutils-gdb-d0c9791728caa0d3b3270a997c7fd97919976c97.tar.gz
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>
Diffstat (limited to 'gdb/m2-lang.c')
-rw-r--r--gdb/m2-lang.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/m2-lang.c b/gdb/m2-lang.c
index fe02c45fba5..42af96d96f2 100644
--- a/gdb/m2-lang.c
+++ b/gdb/m2-lang.c
@@ -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