From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 4093F3858C2D for ; Mon, 23 May 2022 19:28:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4093F3858C2D Received: from mimecast-mx02.redhat.com (mx3-rdu2.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-195-X9rms0ZpNsST6XfbNaG5EQ-1; Mon, 23 May 2022 15:28:39 -0400 X-MC-Unique: X9rms0ZpNsST6XfbNaG5EQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7F63E3C01D86 for ; Mon, 23 May 2022 19:28:39 +0000 (UTC) Received: from t14s.localdomain.com (unknown [10.2.17.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5B5702166B25; Mon, 23 May 2022 19:28:39 +0000 (UTC) From: David Malcolm To: gcc-patches@gcc.gnu.org Subject: [PATCH 04/10] tree-switch-conversion.h: use final/override for cluster vfunc impls Date: Mon, 23 May 2022 15:28:28 -0400 Message-Id: <20220523192834.3785673-5-dmalcolm@redhat.com> In-Reply-To: <20220523192834.3785673-1-dmalcolm@redhat.com> References: <20220523192834.3785673-1-dmalcolm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-12.5 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_LOW, SPF_HELO_NONE, SPF_NONE, 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2022 19:28:42 -0000 gcc/ChangeLog: * tree-switch-conversion.h: Add "final" and "override" to cluster vfunc implementations as appropriate. Signed-off-by: David Malcolm --- gcc/tree-switch-conversion.h | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/gcc/tree-switch-conversion.h b/gcc/tree-switch-conversion.h index 2b677d9f7e9..d22515eb296 100644 --- a/gcc/tree-switch-conversion.h +++ b/gcc/tree-switch-conversion.h @@ -130,19 +130,19 @@ public: {} cluster_type - get_type () + get_type () final override { return SIMPLE_CASE; } tree - get_low () + get_low () final override { return m_low; } tree - get_high () + get_high () final override { return m_high; } @@ -153,13 +153,13 @@ public: } void - debug () + debug () final override { dump (stderr); } void - dump (FILE *f, bool details ATTRIBUTE_UNUSED = false) + dump (FILE *f, bool details ATTRIBUTE_UNUSED = false) final override { PRINT_CASE (f, get_low ()); if (get_low () != get_high ()) @@ -170,12 +170,12 @@ public: fprintf (f, " "); } - void emit (tree, tree, tree, basic_block, location_t) + void emit (tree, tree, tree, basic_block, location_t) final override { gcc_unreachable (); } - bool is_single_value_p () + bool is_single_value_p () final override { return tree_int_cst_equal (get_low (), get_high ()); } @@ -224,24 +224,24 @@ public: ~group_cluster (); tree - get_low () + get_low () final override { return m_cases[0]->get_low (); } tree - get_high () + get_high () final override { return m_cases[m_cases.length () - 1]->get_high (); } void - debug () + debug () final override { dump (stderr); } - void dump (FILE *f, bool details = false); + void dump (FILE *f, bool details = false) final override; /* List of simple clusters handled by the group. */ vec m_cases; @@ -261,13 +261,14 @@ public: {} cluster_type - get_type () + get_type () final override { return JUMP_TABLE; } void emit (tree index_expr, tree index_type, - tree default_label_expr, basic_block default_bb, location_t loc); + tree default_label_expr, basic_block default_bb, location_t loc) + final override; /* Find jump tables of given CLUSTERS, where all members of the vector are of type simple_cluster. New clusters are returned. */ @@ -366,7 +367,7 @@ public: {} cluster_type - get_type () + get_type () final override { return BIT_TEST; } @@ -388,7 +389,8 @@ public: There *MUST* be max_case_bit_tests or less unique case node targets. */ void emit (tree index_expr, tree index_type, - tree default_label_expr, basic_block default_bb, location_t loc); + tree default_label_expr, basic_block default_bb, location_t loc) + final override; /* Find bit tests of given CLUSTERS, where all members of the vector are of type simple_cluster. New clusters are returned. */ -- 2.26.3