summaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2020-07-04 09:06:08 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2020-09-16 10:16:47 +0100
commit67bd3fd5e4d1bf9f1730eaf6ed9fa9df89904fc2 (patch)
tree3165b7d615b9de7ee5acfc311221fe2efda09acc /gdb/valops.c
parent85967615df75e299b375223cc5d211ef78fcf3e8 (diff)
downloadbinutils-gdb-67bd3fd5e4d1bf9f1730eaf6ed9fa9df89904fc2.tar.gz
gdb: Convert language_data::c_style_arrays to a method
Convert language_data::c_style_arrays member variable to a virtual method language_defn::c_style_arrays_p. There should be no user visible changes after this commit. gdb/ChangeLog: * ada-lang.c (ada_language_data): Remove c_style_arrays initializer. (ada_language::c_style_arrays_p): New member fuction. * c-lang.c (c_language_data): Remove c_style_arrays initializer. (cplus_language_data): Likewise. (asm_language_data): Likewise. (minimal_language_data): Likewise. * d-lang.c (d_language_data): Likewise. * eval.c (ptrmath_type_p): Update call to c_style_arrays_p. * f-lang.c (f_language_data): Remove c_style_arrays initializer. (f_language::c_style_arrays_p): New member function. * go-lang.c (go_language_data): Remove c_style_arrays initializer. * infcall.c (value_arg_coerce): Update call to c_style_arrays_p. * language.c (unknown_language_data): Remove c_style_arrays initializer. (auto_language_data): Likewise. * language.h (language_data): Remove c_style_arrays field. (language_defn::c_style_arrays_p): New member function. * m2-lang.c (m2_language_data): Remove c_style_arrays initializer. (m2_language::c_style_arrays_p): New member function. * objc-lang.c (objc_language_data): Remove c_style_arrays initializer. * opencl-lang.c (opencl_language_data): Likewise. * p-lang.c (pascal_language_data): Likewise. * rust-lang.c (rust_language_data): Likewise. * valarith.c (value_subscript): Update call to c_style_arrays_p, and update local variable to a bool. * valops.c (value_cast): Update call to c_style_arrays_p. (value_array): Likewise. * value.c (coerce_array): Likewise.
Diffstat (limited to 'gdb/valops.c')
-rw-r--r--gdb/valops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/valops.c b/gdb/valops.c
index 6dc2f54b14d..7b604da0fd5 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -414,7 +414,7 @@ value_cast (struct type *type, struct value *arg2)
}
}
- if (current_language->c_style_arrays
+ if (current_language->c_style_arrays_p ()
&& type2->code () == TYPE_CODE_ARRAY
&& !type2->is_vector ())
arg2 = value_coerce_array (arg2);
@@ -1622,7 +1622,7 @@ value_array (int lowbound, int highbound, struct value **elemvec)
arraytype = lookup_array_range_type (value_enclosing_type (elemvec[0]),
lowbound, highbound);
- if (!current_language->c_style_arrays)
+ if (!current_language->c_style_arrays_p ())
{
val = allocate_value (arraytype);
for (idx = 0; idx < nelem; idx++)