aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2022-06-27 17:00:33 -0400
committerDavid Malcolm <dmalcolm@redhat.com>2022-06-27 17:00:33 -0400
commita2f2e0ffa2a270043a1c16ba4553652c7b8d4525 (patch)
treed0959ff07cf63f9bdedd071198915e8e5e61753f
parentddff65d64d5fb20da7dea3adaa406e2244d055e9 (diff)
downloadgcc-a2f2e0ffa2a270043a1c16ba4553652c7b8d4525.zip
gcc-a2f2e0ffa2a270043a1c16ba4553652c7b8d4525.tar.gz
gcc-a2f2e0ffa2a270043a1c16ba4553652c7b8d4525.tar.bz2
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>
-rw-r--r--gcc/tree-switch-conversion.h32
1 files changed, 17 insertions, 15 deletions
diff --git a/gcc/tree-switch-conversion.h b/gcc/tree-switch-conversion.h
index 4063a6c..6861572 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. */