public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Malcolm <dmalcolm@redhat.com>
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	[thread overview]
Message-ID: <20220523192834.3785673-5-dmalcolm@redhat.com> (raw)
In-Reply-To: <20220523192834.3785673-1-dmalcolm@redhat.com>

gcc/ChangeLog:
	* tree-switch-conversion.h: Add "final" and "override" to cluster
	vfunc implementations as appropriate.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
---
 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<simple_cluster *> 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


  parent reply	other threads:[~2022-05-23 19:28 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-23 19:28 [PATCH 00/10] Add 'final' and 'override' where missing David Malcolm
2022-05-23 19:28 ` [PATCH 01/10] Add 'final' and 'override' to opt_pass vfunc impls David Malcolm
2022-06-13 18:22   ` PING: " David Malcolm
2022-06-24 18:08     ` PING^2: " David Malcolm
2022-06-24 18:45       ` Jeff Law
2022-06-27 21:16         ` David Malcolm
2022-05-23 19:28 ` [PATCH 02/10] Add 'final' and 'override' on dom_walker " David Malcolm
2022-06-13 18:23   ` PING " David Malcolm
2022-06-24 18:10     ` PING^2 " David Malcolm
2022-05-23 19:28 ` [PATCH 03/10] expr.cc: use final/override on op_by_pieces_d vfuncs David Malcolm
2022-06-13 18:25   ` PING: " David Malcolm
2022-06-24 18:12     ` PING^2 : " David Malcolm
2022-05-23 19:28 ` David Malcolm [this message]
2022-06-13 18:26   ` PING Re: [PATCH 04/10] tree-switch-conversion.h: use final/override for cluster vfunc impls David Malcolm
2022-06-24 18:14     ` PING^2 : " David Malcolm
2022-05-23 19:28 ` [PATCH 05/10] d: add 'final' and 'override' to gcc/d/*.cc 'visit' impls David Malcolm
2022-05-24 12:56   ` Iain Buclaw
2022-05-24 13:15     ` David Malcolm
2022-05-24 15:11       ` Iain Buclaw
2022-05-23 19:28 ` [PATCH 06/10] ipa: add 'final' and 'override' to call_summary_base vfunc impls David Malcolm
2022-05-24  7:36   ` Martin Liška
2022-05-23 19:28 ` [PATCH 07/10] value-relation.h: add 'final' and 'override' to relation_oracle " David Malcolm
2022-06-13 18:28   ` PING " David Malcolm
2022-06-14  0:45     ` Aldy Hernandez
2022-06-14  1:24       ` David Malcolm
2022-06-15 13:33         ` Andrew MacLeod
2022-06-15 21:58           ` David Malcolm
2022-05-23 19:28 ` [PATCH 08/10] i386: add 'final' and 'override' to scalar_chain " David Malcolm
2022-06-13 18:30   ` PING: " David Malcolm
2022-06-24 18:19     ` PING^2 : " David Malcolm
2022-06-24 20:58       ` Uros Bizjak
2022-06-27 21:25         ` David Malcolm
2022-08-16  8:55       ` [PATCH][pushed] i386: add 'final' and 'override' to scalar_chain Martin Liška
2022-05-23 19:28 ` [PATCH 09/10] tree-vect-slp-patterns.cc: add 'final' and 'override' to vect_pattern::build impls David Malcolm
2022-05-24  6:44   ` Richard Biener
2022-05-23 19:28 ` [PATCH 10/10] Add 'final' and 'override' in various places David Malcolm
2022-06-13 18:30   ` PING " David Malcolm
2022-06-24 18:20     ` PING^2: " David Malcolm
2022-05-25  3:29 ` [PATCH 00/10] Add 'final' and 'override' where missing Eric Gallager

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220523192834.3785673-5-dmalcolm@redhat.com \
    --to=dmalcolm@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).