From patchwork Sun Oct 8 22:58:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Malcolm X-Patchwork-Id: 149782 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp1560399vqo; Sun, 8 Oct 2023 16:01:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEgdEgah+5Crb0QczCOtI8U9vSFpgMgbYXuhU18Xx9WItAhkiGRDMJLUtBA1RvNifQ6Vie+ X-Received: by 2002:a17:906:54:b0:9ae:3435:ad45 with SMTP id 20-20020a170906005400b009ae3435ad45mr10071214ejg.76.1696806080474; Sun, 08 Oct 2023 16:01:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696806080; cv=none; d=google.com; s=arc-20160816; b=jAsXHWMVaoSMDxbPF4IqvQq69pNwUTkBTi399WuoTZ0FvHTXSnus8V72ToKAkM6hf7 siK7mkOPQnc1xsxu1Rymmd3pjc/4Y+V4F6cHWjqEFhpu0dbEy1WPOREoa0Caehq1sYf9 r8Z/R8Ik/0ISTOpmPFrKPc4ysB9wo5iE09zHq4KW4S5OCR9LkdeBxocl7dKb4Toh/7c7 BfQwSo/63XuO/3r8A+zQmJR0w02HNU+9z7hIcsZpqUb80Lr4NgzNr0YBs0JxgrIODKQY 881LZoiW+I87vFoyWDqCnISNwa31XlxX6qt4DR7BvputRpNOpvauAxCDQqNn+vKiEFx4 uOwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :dmarc-filter:delivered-to; bh=n31npJ3oJLXX3yHas4kc8D3OvLlEQ+j+q32NX/MqDks=; fh=NXemEfxTRbZtBxUkxR2ehQUaYlcDfMdzPkO8MChVQE4=; b=sKyvoprNXiFCGycxMuBqRoUnr1McHenaYZ/G0VQbuzT4d1trJQmIedEttHRPazIAfS NEL4sdcA0SNOjtvMapXleryIWr/VKQBoR09kaa3ldU5qn2rEhqH29mrlmXSmxJ/i0693 AhlA6wu7rsr2yUt0BNVPvNrzMHJQQIxCYBlbsoxEc2pTo0x5fY+yu5szYOK/cDu4v0Oo JHFrxXGUqtZCNlcEBtFpIObZB9kqgCqnwRGu8EcKNCfP2+aQRCW2OnYXrpFUuvwbfFkG /C1kP6+xHoG/6APTkhS3IYkn8D0GQKRJib9KWPPQcZrvslyRVerSEqZb6jJuYysF3kx0 2xYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=QL0zzkfU; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id jt16-20020a170906dfd000b009b64f1b6dfasi3984810ejc.595.2023.10.08.16.01.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Oct 2023 16:01:20 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=QL0zzkfU; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A87513871034 for ; Sun, 8 Oct 2023 22:59:41 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 415553858407 for ; Sun, 8 Oct 2023 22:59:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 415553858407 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696805941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n31npJ3oJLXX3yHas4kc8D3OvLlEQ+j+q32NX/MqDks=; b=QL0zzkfUFrjolctjpg9oL8cw63TobUPmeozbTcPp/VOzHsjCfGBecztGuw3belcZguM8FB C9ydrdfPxdp+xWIfAqUtBX/R82TnY0B9KoG9B0qr4xKqdZol+H9LklRqlkSgfk0VCh9Jsg fMexnN7RE44E+wGBQ94bAyGhNn6g/Ts= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-304-Z0Q25cFlPK69Wu5qjSC0Gg-1; Sun, 08 Oct 2023 18:59:00 -0400 X-MC-Unique: Z0Q25cFlPK69Wu5qjSC0Gg-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 101CA3C025BE for ; Sun, 8 Oct 2023 22:59:00 +0000 (UTC) Received: from t14s.localdomain.com (unknown [10.22.18.119]) by smtp.corp.redhat.com (Postfix) with ESMTP id DF7FC492B16; Sun, 8 Oct 2023 22:58:59 +0000 (UTC) From: David Malcolm To: gcc-patches@gcc.gnu.org Cc: David Malcolm Subject: [pushed] libcpp: eliminate LINEMAPS_LAST_ALLOCATED{, _ORDINARY, _MACRO}_MAP Date: Sun, 8 Oct 2023 18:58:59 -0400 Message-Id: <20231008225859.783728-1-dmalcolm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779230132305165379 X-GMAIL-MSGID: 1779230132305165379 Nothing uses these; delete them. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r14-4478-ga73c80d99736f0. libcpp/ChangeLog: * include/line-map.h (LINEMAPS_LAST_ALLOCATED_MAP): Delete. (LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP): Delete. (LINEMAPS_LAST_ALLOCATED_MACRO_MAP): Delete. --- libcpp/include/line-map.h | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h index b353df45209..7a172f4c846 100644 --- a/libcpp/include/line-map.h +++ b/libcpp/include/line-map.h @@ -936,16 +936,6 @@ LINEMAPS_LAST_MAP (const line_maps *set, bool map_kind) LINEMAPS_USED (set, map_kind) - 1); } -/* Returns the last map that was allocated in the line table SET. - MAP_KIND shall be TRUE if we are interested in macro maps, FALSE - otherwise.*/ -inline line_map * -LINEMAPS_LAST_ALLOCATED_MAP (const line_maps *set, bool map_kind) -{ - return LINEMAPS_MAP_AT (set, map_kind, - LINEMAPS_ALLOCATED (set, map_kind) - 1); -} - /* Returns a pointer to the memory region where ordinary maps are allocated in the line table SET. */ inline line_map_ordinary * @@ -994,14 +984,6 @@ LINEMAPS_LAST_ORDINARY_MAP (const line_maps *set) return (line_map_ordinary *)LINEMAPS_LAST_MAP (set, false); } -/* Returns a pointer to the last ordinary map allocated the line table - SET. */ -inline line_map_ordinary * -LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP (const line_maps *set) -{ - return (line_map_ordinary *)LINEMAPS_LAST_ALLOCATED_MAP (set, false); -} - /* Returns a pointer to the beginning of the region where macro maps are allocated. */ inline line_map_macro * @@ -1059,13 +1041,6 @@ LINEMAPS_MACRO_LOWEST_LOCATION (const line_maps *set) : MAX_LOCATION_T + 1; } -/* Returns the last macro map allocated in the line table SET. */ -inline line_map_macro * -LINEMAPS_LAST_ALLOCATED_MACRO_MAP (const line_maps *set) -{ - return (line_map_macro *)LINEMAPS_LAST_ALLOCATED_MAP (set, true); -} - extern void *get_data_from_adhoc_loc (const line_maps *, location_t); extern unsigned get_discriminator_from_adhoc_loc (const line_maps *, location_t); extern location_t get_location_from_adhoc_loc (const line_maps *,