From 76675c4d0bc454ed1ae369f98ad848754d0e81a0 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 31 Jan 2023 10:05:01 -0700 Subject: Turn value_offset into method This changes value_offset to be a method of value. Much of this patch was written by script. Approved-By: Simon Marchi --- gdb/opencl-lang.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/opencl-lang.c') diff --git a/gdb/opencl-lang.c b/gdb/opencl-lang.c index f66489b..107a138 100644 --- a/gdb/opencl-lang.c +++ b/gdb/opencl-lang.c @@ -122,7 +122,7 @@ lval_func_read (struct value *v) struct lval_closure *c = (struct lval_closure *) value_computed_closure (v); struct type *type = check_typedef (v->type ()); struct type *eltype = check_typedef (c->val->type ())->target_type (); - LONGEST offset = value_offset (v); + LONGEST offset = v->offset (); LONGEST elsize = eltype->length (); int n, i, j = 0; LONGEST lowb = 0; @@ -152,7 +152,7 @@ lval_func_write (struct value *v, struct value *fromval) struct lval_closure *c = (struct lval_closure *) value_computed_closure (v); struct type *type = check_typedef (v->type ()); struct type *eltype = check_typedef (c->val->type ())->target_type (); - LONGEST offset = value_offset (v); + LONGEST offset = v->offset (); LONGEST elsize = eltype->length (); int n, i, j = 0; LONGEST lowb = 0; -- cgit v1.1