It is customary to mark the gate and execute functions of the classes
representing passes as final override but this is missing in
pass_rtl_avoid_store_forwarding. This patch adds it which also
silences a clang warning about it.
gcc/ChangeLog:
2025-06-24 Martin Jambor <mjambor@suse.cz>
* avoid-store-forwarding.cc (class
pass_rtl_avoid_store_forwarding): Mark member function gate as
final override.
{}
/* opt_pass methods: */
- virtual bool gate (function *)
+ virtual bool gate (function *) final override
{
return flag_avoid_store_forwarding && optimize >= 1;
}
- virtual unsigned int execute (function *) override;
+ virtual unsigned int execute (function *) final override;
}; // class pass_rtl_avoid_store_forwarding
/* Handler for finding and avoiding store forwardings. */