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>
This commit is contained in:
David Malcolm 2022-06-27 17:00:33 -04:00
parent ddff65d64d
commit a2f2e0ffa2

View file

@ -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. */