aboutsummaryrefslogtreecommitdiff
path: root/gdb/opencl-lang.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-01-31 14:38:30 -0700
committerTom Tromey <tom@tromey.com>2023-02-13 15:22:16 -0700
commitefaf1ae025cbef5438d2fe943dd010b773d757ac (patch)
treed51e1d379430439462d5cb1358c642e679647f12 /gdb/opencl-lang.c
parentcdf3de175d41acec85d6c3cc8b599f79658edb06 (diff)
downloadgdb-efaf1ae025cbef5438d2fe943dd010b773d757ac.zip
gdb-efaf1ae025cbef5438d2fe943dd010b773d757ac.tar.gz
gdb-efaf1ae025cbef5438d2fe943dd010b773d757ac.tar.bz2
Turn remaining value_contents functions into methods
This turns the remaining value_contents functions -- value_contents, value_contents_all, value_contents_for_printing, and value_contents_for_printing_const -- into methods of value. It also converts the static functions require_not_optimized_out and require_available to be private methods. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/opencl-lang.c')
-rw-r--r--gdb/opencl-lang.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/opencl-lang.c b/gdb/opencl-lang.c
index 81889b9..b3e82f4 100644
--- a/gdb/opencl-lang.c
+++ b/gdb/opencl-lang.c
@@ -140,7 +140,7 @@ lval_func_read (struct value *v)
for (i = offset; i < n; i++)
memcpy (v->contents_raw ().data () + j++ * elsize,
- value_contents (c->val).data () + c->indices[i] * elsize,
+ c->val->contents ().data () + c->indices[i] * elsize,
elsize);
}
@@ -181,7 +181,7 @@ lval_func_write (struct value *v, struct value *fromval)
struct value *to_elm_val = value_subscript (c->val, c->indices[i]);
memcpy (from_elm_val->contents_writeable ().data (),
- value_contents (fromval).data () + j++ * elsize,
+ fromval->contents ().data () + j++ * elsize,
elsize);
value_assign (to_elm_val, from_elm_val);
}
@@ -315,7 +315,7 @@ create_value (struct gdbarch *gdbarch, struct value *val, enum noside noside,
for (i = 0; i < n; i++)
memcpy (ret->contents_writeable ().data ()
+ (i * elm_type->length ()),
- value_contents (val).data ()
+ val->contents ().data ()
+ (indices[i] * elm_type->length ()),
elm_type->length ());
}
@@ -837,7 +837,7 @@ Cannot perform conditional operation on vectors with different sizes"));
tmp = value_logical_not (value_subscript (arg1, i)) ?
value_subscript (arg3, i) : value_subscript (arg2, i);
memcpy (ret->contents_writeable ().data () +
- i * eltype2->length (), value_contents_all (tmp).data (),
+ i * eltype2->length (), tmp->contents_all ().data (),
eltype2->length ());
}