From patchwork Mon Nov 25 05:26:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 36172 Received: (qmail 49519 invoked by alias); 25 Nov 2019 05:27:24 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 49464 invoked by uid 89); 25 Nov 2019 05:27:23 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1866 X-HELO: mail.efficios.com Received: from mail.efficios.com (HELO mail.efficios.com) (167.114.142.138) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 25 Nov 2019 05:27:21 +0000 Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 6596B34753C for ; Mon, 25 Nov 2019 00:27:20 -0500 (EST) Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id XkjVf8p9Ve2c; Mon, 25 Nov 2019 00:27:20 -0500 (EST) Received: from localhost (ip6-localhost [IPv6:::1]) by mail.efficios.com (Postfix) with ESMTP id 620D23474E5; Mon, 25 Nov 2019 00:27:17 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 620D23474E5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1574659637; bh=DhXrQ8h4pMGosMH9uzzHetG7CHh0YS3Lu9CsSHwabVQ=; h=From:To:Date:Message-Id:MIME-Version; b=ritK77/X/z+zxbkuiXkCaUVTZLRJh9SzTUm8OMbbZMaoaoecnxa5zvJyDEXVvGCnH zacm/HbsTFCHKY9ugol8KYdKrFIwx2+Mv1XdzZxBUyPc/e4G/TE4/CceK+7koADb3g UG/XRNBDkNMMK8ETFqyTATkOwcVFbRIIXt0i+GQ2vmogRf5U0qXjtuZgbaB7NBeIM7 AOarNbDdAsUAAtB3wQ2gR2Ket9GbkS+6qPxpZolJxONBYpJpwJH7EsTu6MrSyV3T5B h2Y1ohaRoXoyCPGlr46UPMkqYqGqUxunfhSBdIl8fXiV5tSQymz9Zey+wZftqvKZUg SAmLl8yVyVrDg== Received: from mail.efficios.com ([IPv6:::1]) by localhost (mail02.efficios.com [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id kmBDvoHRsZCN; Mon, 25 Nov 2019 00:27:17 -0500 (EST) Received: from smarchi-efficios.lan (unknown [192.222.164.54]) by mail.efficios.com (Postfix) with ESMTPSA id BB5073474A6; Mon, 25 Nov 2019 00:27:10 -0500 (EST) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 06/15] Remove dict_empty/mdict_empty Date: Mon, 25 Nov 2019 00:26:46 -0500 Message-Id: <20191125052655.22696-7-simon.marchi@efficios.com> In-Reply-To: <20191125052655.22696-1-simon.marchi@efficios.com> References: <20191125052655.22696-1-simon.marchi@efficios.com> MIME-Version: 1.0 These functions are not used in the code base, remove them. gdb/ChangeLog: * dictionary.c (dict_empty, mdict_empty): Remove. * dictionary.c (mdict_empty): Remove. Change-Id: I4c1b08c730f6790b2f3d28b680607618e3c08e48 --- gdb/dictionary.c | 24 ------------------------ gdb/dictionary.h | 4 ---- 2 files changed, 28 deletions(-) diff --git a/gdb/dictionary.c b/gdb/dictionary.c index 939f32b59afb..0d13370b7269 100644 --- a/gdb/dictionary.c +++ b/gdb/dictionary.c @@ -508,16 +508,6 @@ dict_size (const struct dictionary *dict) implemented generically by means of the vtable. Typically, they're rarely used. */ -/* Test to see if DICT is empty. */ - -static int -dict_empty (struct dictionary *dict) -{ - struct dict_iterator iter; - - return (dict_iterator_first (dict, &iter) == NULL); -} - /* The functions implementing the dictionary interface. */ @@ -1283,17 +1273,3 @@ mdict_size (const struct multidictionary *mdict) return size; } - -/* See dictionary.h. */ - -bool -mdict_empty (const struct multidictionary *mdict) -{ - for (unsigned short idx = 0; idx < mdict->n_allocated_dictionaries; ++idx) - { - if (!dict_empty (mdict->dictionaries[idx])) - return false; - } - - return true; -} diff --git a/gdb/dictionary.h b/gdb/dictionary.h index e6481cd38ce9..9a7739b7c10d 100644 --- a/gdb/dictionary.h +++ b/gdb/dictionary.h @@ -93,10 +93,6 @@ extern void mdict_add_symbol (struct multidictionary *mdict, extern void mdict_add_pending (struct multidictionary *mdict, const struct pending *symbol_list); -/* Is the multidictionary empty? */ - -extern int mdict_empty (struct multidictionary *mdict); - /* A type containing data that is used when iterating over all symbols in a dictionary. Don't ever look at its innards; this type would be opaque if we didn't need to be able to allocate it on the