From patchwork Tue Nov 21 03:53:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 80404 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B478D3858422 for ; Tue, 21 Nov 2023 03:54:55 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from omta038.useast.a.cloudfilter.net (omta038.useast.a.cloudfilter.net [44.202.169.37]) by sourceware.org (Postfix) with ESMTPS id 5AB693858C74 for ; Tue, 21 Nov 2023 03:53:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5AB693858C74 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5AB693858C74 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700538806; cv=none; b=tkfjchYoNrfB1LgiGNcGa/Tbijbjz2d7+MOfeesH+S22onyE7qTbcFOls3gTwuK9iUuHKpIKGGYkXFqeF23TqSXdY9RLCTGwlJIjAN8BG69vtkU4wAf6jR6LikrSOG8m8gtkQ+VAiphNUlS8aYZoptzwJOWujqVuE2iTrwwxpxY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700538806; c=relaxed/simple; bh=WSpPfW9rUK270yQ0S/XlbtUxxuV7QRXa22eULKmith4=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=FTzhj8Ho8oWUtajJqhBChhyM5IuyqrnSC8CDhhmCTv8CXdxHp/RLTXxXVONYbGgX/I/JwBrMD1cuZbZIOY4M3XJI1d+iGvgVan9fxRA8vvw6+6iMb7fmXASvmw6ED5XhbeZbD0QI463xzsopgF9iMCKr3Gpwy7tmrM96CBnEvok= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-5004a.ext.cloudfilter.net ([10.0.29.221]) by cmsmtp with ESMTPS id 5DYgrnj93WcCI5HpCrZVLn; Tue, 21 Nov 2023 03:53:22 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id 5HpBr8Ecb11XZ5HpBryOPg; Tue, 21 Nov 2023 03:53:21 +0000 X-Authority-Analysis: v=2.4 cv=Z+v/oVdA c=1 sm=1 tr=0 ts=655c29b1 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=OWjo9vPv0XrRhIrVQ50Ab3nP57M=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=IkcTkHD0fZMA:10 a=BNY50KLci1gA:10 a=Qbun_eYptAEA:10 a=erOdZxmXbWm6VKJsYvcA:9 a=QEXdDO2ut3YA:10 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=To:In-Reply-To:References:Message-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:Date:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=WmngL4BhwRnYGyLc7+VTnkr88cHxfacBjCWcXESj8go=; b=N7Lc4KVi2XRppAtKQCeLtN2sEr 5Y//nMa2L1sq2bNRudZLlZMwGAnaWhaAjFzjwbO5aZQpWZKr/cM/eqk2YchaD23aE8VYJxB7Gri4M EsgwtjtsK/+Y3Pul8Zjmt8UCw; Received: from 97-122-77-73.hlrn.qwest.net ([97.122.77.73]:47856 helo=[192.168.0.21]) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1r5HpB-0040be-0D for gdb-patches@sourceware.org; Mon, 20 Nov 2023 20:53:21 -0700 From: Tom Tromey Date: Mon, 20 Nov 2023 20:53:49 -0700 Subject: [PATCH 18/29] Remove old symbol_matches_domain MIME-Version: 1.0 Message-Id: <20231120-submit-domain-hacks-2-v1-18-29650d01b198@tromey.com> References: <20231120-submit-domain-hacks-2-v1-0-29650d01b198@tromey.com> In-Reply-To: <20231120-submit-domain-hacks-2-v1-0-29650d01b198@tromey.com> To: gdb-patches@sourceware.org X-Mailer: b4 0.12.4 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.77.73 X-Source-L: No X-Exim-ID: 1r5HpB-0040be-0D X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-77-73.hlrn.qwest.net ([192.168.0.21]) [97.122.77.73]:47856 X-Source-Auth: tom+tromey.com X-Email-Count: 19 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfITq5dUtkO3fnQezfy5M21eRvbhoPMCwSmf8IXjSkUdzdKEVL0aBBc8YFaDSKQdwtEptth04SI1EpfiGUVXvXD6+cblkEEphhJo6lJUh+QiUwY8e3beu 0psoM2kQMo26F+RHKWfR1MSaNoiSx+t73IIBLNBbHFvRrcKN5ooO0OCxELyHfbwsXwJNqjN84dynps3G7hn8F9Z8Q0N1HH5mu60= X-Spam-Status: No, score=-3024.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Nothing calls the variant of symbol_matches_domain that accepts a domain_enum for searching, so this patch removes it and the corresponding symbol::matches. --- gdb/symtab.c | 20 -------------------- gdb/symtab.h | 11 ----------- 2 files changed, 31 deletions(-) diff --git a/gdb/symtab.c b/gdb/symtab.c index 4a5d6ef5792..874e475cd61 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -2675,26 +2675,6 @@ lookup_global_symbol (const char *name, return bs; } -bool -symbol_matches_domain (enum language symbol_language, - domain_enum symbol_domain, - domain_enum domain) -{ - /* For C++ "struct foo { ... }" also defines a typedef for "foo". - Similarly, any Ada type declaration implicitly defines a typedef. */ - if (symbol_language == language_cplus - || symbol_language == language_d - || symbol_language == language_ada - || symbol_language == language_rust) - { - if ((domain == VAR_DOMAIN || domain == STRUCT_DOMAIN) - && symbol_domain == STRUCT_DOMAIN) - return true; - } - /* For all other languages, strict match is required. */ - return (symbol_domain == domain); -} - /* See symtab.h. */ bool diff --git a/gdb/symtab.h b/gdb/symtab.h index 414fa29e863..e44420e458b 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -1236,10 +1236,6 @@ enum symbol_subclass_kind extern gdb::array_view symbol_impls; -bool symbol_matches_domain (enum language symbol_language, - domain_enum symbol_domain, - domain_enum domain); - /* This structure is space critical. See space comments at the top. */ struct symbol : public general_symbol_info, public allocate_on_obstack @@ -1286,13 +1282,6 @@ struct symbol : public general_symbol_info, public allocate_on_obstack return this->impl ().aclass; } - /* Call symbol_matches_domain on this symbol, using the symbol's - domain. */ - bool matches (domain_enum d) const - { - return symbol_matches_domain (language (), domain (), d); - } - /* Return true if this symbol's domain matches FLAGS. */ bool matches (domain_search_flags flags) const;