aboutsummaryrefslogtreecommitdiff
path: root/gdb/valops.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-09-14 11:08:03 -0400
committerSimon Marchi <simon.marchi@efficios.com>2020-09-14 11:08:03 -0400
commitbd63c870088388fc55efbf50f2dfc0592fe874e5 (patch)
treefc002e3c53ff9e8ae8a194b83cc9c87c5292d448 /gdb/valops.c
parent2062087b358cc5320d52b32c50866dbd08fb2631 (diff)
downloadgdb-bd63c870088388fc55efbf50f2dfc0592fe874e5.zip
gdb-bd63c870088388fc55efbf50f2dfc0592fe874e5.tar.gz
gdb-bd63c870088388fc55efbf50f2dfc0592fe874e5.tar.bz2
gdb: remove TYPE_VECTOR
gdb/ChangeLog: * gdbtypes.h (TYPE_VECTOR): Remove, replace all uses with type::is_vector. Change-Id: I1ac28755af44b1585c190553f9961288c8fb9137
Diffstat (limited to 'gdb/valops.c')
-rw-r--r--gdb/valops.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/valops.c b/gdb/valops.c
index aba4c70..da2881a 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -416,7 +416,7 @@ value_cast (struct type *type, struct value *arg2)
if (current_language->c_style_arrays
&& type2->code () == TYPE_CODE_ARRAY
- && !TYPE_VECTOR (type2))
+ && !type2->is_vector ())
arg2 = value_coerce_array (arg2);
if (type2->code () == TYPE_CODE_FUNC)
@@ -529,11 +529,11 @@ value_cast (struct type *type, struct value *arg2)
minus one, instead of biasing the normal case. */
return value_from_longest (to_type, -1);
}
- else if (code1 == TYPE_CODE_ARRAY && TYPE_VECTOR (type)
- && code2 == TYPE_CODE_ARRAY && TYPE_VECTOR (type2)
+ else if (code1 == TYPE_CODE_ARRAY && type->is_vector ()
+ && code2 == TYPE_CODE_ARRAY && type2->is_vector ()
&& TYPE_LENGTH (type) != TYPE_LENGTH (type2))
error (_("Cannot convert between vector values of different sizes"));
- else if (code1 == TYPE_CODE_ARRAY && TYPE_VECTOR (type) && scalar
+ else if (code1 == TYPE_CODE_ARRAY && type->is_vector () && scalar
&& TYPE_LENGTH (type) != TYPE_LENGTH (type2))
error (_("can only cast scalar to vector of same size"));
else if (code1 == TYPE_CODE_VOID)
@@ -854,7 +854,7 @@ value_one (struct type *type)
{
val = value_from_longest (type, (LONGEST) 1);
}
- else if (type1->code () == TYPE_CODE_ARRAY && TYPE_VECTOR (type1))
+ else if (type1->code () == TYPE_CODE_ARRAY && type1->is_vector ())
{
struct type *eltype = check_typedef (TYPE_TARGET_TYPE (type1));
int i;
@@ -1361,7 +1361,7 @@ value_must_coerce_to_target (struct value *val)
switch (valtype->code ())
{
case TYPE_CODE_ARRAY:
- return TYPE_VECTOR (valtype) ? 0 : 1;
+ return valtype->is_vector () ? 0 : 1;
case TYPE_CODE_STRING:
return true;
default: