public inbox for jit@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Malcolm <dmalcolm@redhat.com>
To: gcc-patches@gcc.gnu.org, jit@gcc.gnu.org
Subject: [committed] jit: use 'final' and 'override' where appropriate
Date: Mon, 23 May 2022 15:14:12 -0400	[thread overview]
Message-ID: <20220523191412.3784267-1-dmalcolm@redhat.com> (raw)

Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r13-715-g58c9c7407a1a99.

gcc/jit/ChangeLog:
	* jit-recording.h: Add "final" and "override" to all vfunc
	implementations that were missing them, as appropriate.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
---
 gcc/jit/jit-recording.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/gcc/jit/jit-recording.h b/gcc/jit/jit-recording.h
index 2dd8a957ca7..0dfb42f2676 100644
--- a/gcc/jit/jit-recording.h
+++ b/gcc/jit/jit-recording.h
@@ -721,14 +721,14 @@ public:
   /* Strip off the "const", giving the underlying type.  */
   type *unqualified () final override { return m_other_type; }
 
-  virtual bool is_same_type_as (type *other)
+  bool is_same_type_as (type *other) final override
   {
     if (!other->is_const ())
       return false;
     return m_other_type->is_same_type_as (other->is_const ());
   }
 
-  virtual type *is_const () { return m_other_type; }
+  type *is_const () final override { return m_other_type; }
 
   void replay_into (replayer *) final override;
 
@@ -744,7 +744,7 @@ public:
   memento_of_get_volatile (type *other_type)
   : decorated_type (other_type) {}
 
-  virtual bool is_same_type_as (type *other)
+  bool is_same_type_as (type *other) final override
   {
     if (!other->is_volatile ())
       return false;
@@ -754,7 +754,7 @@ public:
   /* Strip off the "volatile", giving the underlying type.  */
   type *unqualified () final override { return m_other_type; }
 
-  virtual type *is_volatile () { return m_other_type; }
+  type *is_volatile () final override { return m_other_type; }
 
   void replay_into (replayer *) final override;
 
@@ -1051,7 +1051,7 @@ public:
 
   void replay_into (replayer *r) final override;
 
-  virtual bool is_union () const final override { return true; }
+  bool is_union () const final override { return true; }
 
 private:
   string * make_debug_string () final override;
-- 
2.26.3


                 reply	other threads:[~2022-05-23 19:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220523191412.3784267-1-dmalcolm@redhat.com \
    --to=dmalcolm@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jit@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).