public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-1308] tree-switch-conversion.h: use final/override for cluster vfunc impls
@ 2022-06-27 21:08 David Malcolm
0 siblings, 0 replies; only message in thread
From: David Malcolm @ 2022-06-27 21:08 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:a2f2e0ffa2a270043a1c16ba4553652c7b8d4525
commit r13-1308-ga2f2e0ffa2a270043a1c16ba4553652c7b8d4525
Author: David Malcolm <dmalcolm@redhat.com>
Date: Mon Jun 27 17:00:33 2022 -0400
tree-switch-conversion.h: use final/override for cluster vfunc impls
gcc/ChangeLog:
* tree-switch-conversion.h: Add "final" and "override" to cluster
vfunc implementations as appropriate.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diff:
---
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 4063a6c16a0..6861572fb17 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. */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-27 21:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-27 21:08 [gcc r13-1308] tree-switch-conversion.h: use final/override for cluster vfunc impls David Malcolm
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).