diff options
author | Tom Tromey <tromey@adacore.com> | 2023-02-28 07:19:41 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-02-28 07:20:29 -0700 |
commit | eae679b9c7760e994c85695946c6b69a227dc69b (patch) | |
tree | a590fd001da8750803365e68a428bed44a1d256f /gdb/valarith.c | |
parent | 7226dd9faabbe6987e5910483374752ca7934255 (diff) | |
download | binutils-gdb-eae679b9c7760e994c85695946c6b69a227dc69b.tar.gz |
Remove value_in
value_in is unused. From git log, it seems to have been part of the
Chill language, which was removed from gdb eons ago. This patch
removes the function. Tested by rebuilding.
Diffstat (limited to 'gdb/valarith.c')
-rw-r--r-- | gdb/valarith.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/gdb/valarith.c b/gdb/valarith.c index a6a5f5102a2..070ee63808e 100644 --- a/gdb/valarith.c +++ b/gdb/valarith.c @@ -2020,26 +2020,3 @@ value_bit_index (struct type *type, const gdb_byte *valaddr, int index) rel_index = TARGET_CHAR_BIT - 1 - rel_index; return (word >> rel_index) & 1; } - -int -value_in (struct value *element, struct value *set) -{ - int member; - struct type *settype = check_typedef (set->type ()); - struct type *eltype = check_typedef (element->type ()); - - if (eltype->code () == TYPE_CODE_RANGE) - eltype = eltype->target_type (); - if (settype->code () != TYPE_CODE_SET) - error (_("Second argument of 'IN' has wrong type")); - if (eltype->code () != TYPE_CODE_INT - && eltype->code () != TYPE_CODE_CHAR - && eltype->code () != TYPE_CODE_ENUM - && eltype->code () != TYPE_CODE_BOOL) - error (_("First argument of 'IN' has wrong type")); - member = value_bit_index (settype, set->contents ().data (), - value_as_long (element)); - if (member < 0) - error (_("First argument of 'IN' not in range")); - return member; -} |