aboutsummaryrefslogtreecommitdiff
path: root/gdb/opencl-lang.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2022-07-30 12:01:12 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2022-09-21 10:59:51 -0400
commitb6cdbc9a8173b9e6cc8cfc284caa0efa8129ca02 (patch)
tree4b7956463a020307fcfa270fdb15f744adcf5c18 /gdb/opencl-lang.c
parent27710edb4e588d0360620df424dd7ee7e8cfafee (diff)
downloadfsf-binutils-gdb-b6cdbc9a8173b9e6cc8cfc284caa0efa8129ca02.zip
fsf-binutils-gdb-b6cdbc9a8173b9e6cc8cfc284caa0efa8129ca02.tar.gz
fsf-binutils-gdb-b6cdbc9a8173b9e6cc8cfc284caa0efa8129ca02.tar.bz2
gdb: add type::length / type::set_length
Add the `length` and `set_length` methods on `struct type`, in order to remove the `TYPE_LENGTH` macro. In this patch, the macro is changed to use the getter, so all the call sites of the macro that are used as a setter are changed to use the setter method directly. The next patch will remove the macro completely. Change-Id: Id1090244f15c9856969b9be5006aefe8d8897ca4
Diffstat (limited to 'gdb/opencl-lang.c')
-rw-r--r--gdb/opencl-lang.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/opencl-lang.c b/gdb/opencl-lang.c
index 32aa58c..5bd3edb 100644
--- a/gdb/opencl-lang.c
+++ b/gdb/opencl-lang.c
@@ -899,7 +899,7 @@ public:
tmp->set_name (OCL_STRING(TYPE ## 2)); \
tmp = add (init_vector_type (ELEMENT_TYPE, 3)); \
tmp->set_name (OCL_STRING(TYPE ## 3)); \
- TYPE_LENGTH (tmp) = 4 * TYPE_LENGTH (ELEMENT_TYPE); \
+ tmp->set_length (4 * TYPE_LENGTH (ELEMENT_TYPE)); \
tmp = add (init_vector_type (ELEMENT_TYPE, 4)); \
tmp->set_name (OCL_STRING(TYPE ## 4)); \
tmp = add (init_vector_type (ELEMENT_TYPE, 8)); \