]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Mark rtl_avoid_store_forwarding functions final override
authorMartin Jambor <mjambor@suse.cz>
Wed, 25 Jun 2025 14:48:44 +0000 (16:48 +0200)
committerMartin Jambor <jamborm@gcc.gnu.org>
Wed, 25 Jun 2025 14:51:58 +0000 (16:51 +0200)
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.

gcc/avoid-store-forwarding.cc

index 6825d0426ecc21f9eec45371e29dcdd046caca47..37e095316c93a003209a59a48db4fce92daec3f8 100644 (file)
@@ -80,12 +80,12 @@ public:
   {}
 
   /* 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.  */