From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from emagii.se (www.emagii.com [185.133.207.17]) by sourceware.org (Postfix) with ESMTPS id 0BF893857C4F for ; Thu, 2 Mar 2023 22:04:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0BF893857C4F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=emagii.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=emagii.com Received: from valinor.ownit.se (84-55-68-216.customers.ownit.se [84.55.68.216]) by emagii.se (Postfix) with ESMTPSA id 4B5631201F3; Thu, 2 Mar 2023 23:04:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emagii.com; s=default; t=1677794667; bh=JfbCZBLb48icnhGbPFicaIOCZfainLCpcLSDImnD7v8=; h=From:To:Subject; b=QlXGGHoFZvChEkaN0jlT/YE+Dpps0jT2i5P41hyIfKTQC6bBaegsjWPa5D+rjA56i yckzpf/XFLuH0nhIdQ/+q3dBDWnC+eeic9ZM1/X+VXRRFoaX/N/ZSG/TuOlZd6TXSG COu7iRbfZRTbBYDBusrMs5V0TXonVkb6IsYnkMvo= Authentication-Results: emagii.beebytevps.io; spf=pass (sender IP is 84.55.68.216) smtp.mailfrom=binutils@emagii.com smtp.helo=valinor.ownit.se Received-SPF: pass (emagii.beebytevps.io: connection is authenticated) From: binutils@emagii.com To: binutils@sourceware.org Cc: nickc@redhat.com, Tom Tromey Subject: [PATCH v9 02/11] Remove value_in Date: Thu, 2 Mar 2023 23:03:59 +0100 Message-Id: <20230302220408.1925678-3-binutils@emagii.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230302220408.1925678-1-binutils@emagii.com> References: <20230302220408.1925678-1-binutils@emagii.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-PPP-Message-ID: <167779466686.1167673.1622141584737926033@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_FAIL,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: From: Tom Tromey 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. --- gdb/valarith.c | 23 ----------------------- gdb/value.h | 2 -- 2 files changed, 25 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; -} diff --git a/gdb/value.h b/gdb/value.h index f2a4907ab81..c3eb96bf143 100644 --- a/gdb/value.h +++ b/gdb/value.h @@ -1270,8 +1270,6 @@ extern struct value *value_bitstring_subscript (struct type *type, extern struct value *register_value_being_returned (struct type *valtype, struct regcache *retbuf); -extern int value_in (struct value *element, struct value *set); - extern int value_bit_index (struct type *type, const gdb_byte *addr, int index); -- 2.34.1