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/m2-lang.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gdb/m2-lang.c') 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 -- cgit v1.2.1