systemc: Add a bunch of missing overrides to the systemc headers.

Change-Id: I664d7b5e7c3b4dd6128d261c95fabaa3d1a97d88
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23125
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
diff --git a/src/systemc/ext/core/sc_export.hh b/src/systemc/ext/core/sc_export.hh
index 100ce66..fcbcd31 100644
--- a/src/systemc/ext/core/sc_export.hh
+++ b/src/systemc/ext/core/sc_export.hh
@@ -70,7 +70,7 @@
     {}
     virtual ~sc_export() {}
 
-    virtual const char *kind() const { return "sc_export"; }
+    virtual const char *kind() const override { return "sc_export"; }
 
     void operator () (IF &i) { bind(i); }
     virtual void
@@ -109,9 +109,9 @@
     const sc_interface *get_interface() const override { return interface; }
 
   protected:
-    void before_end_of_elaboration() {}
+    void before_end_of_elaboration() override {}
     void
-    end_of_elaboration()
+    end_of_elaboration() override
     {
         if (!interface) {
             std::string msg = "export not bound: export '";
@@ -119,8 +119,8 @@
             SC_REPORT_ERROR("(E109) complete binding failed", msg.c_str());
         }
     }
-    void start_of_simulation() {}
-    void end_of_simulation() {}
+    void start_of_simulation() override  {}
+    void end_of_simulation() override {}
 
   private:
     IF *interface;
diff --git a/src/systemc/ext/core/sc_port.hh b/src/systemc/ext/core/sc_port.hh
index 99e7ace..7399a16 100644
--- a/src/systemc/ext/core/sc_port.hh
+++ b/src/systemc/ext/core/sc_port.hh
@@ -180,10 +180,10 @@
     }
 
   protected:
-    void before_end_of_elaboration() {}
-    void end_of_elaboration() {}
-    void start_of_simulation() {}
-    void end_of_simulation() {}
+    void before_end_of_elaboration() override {}
+    void end_of_elaboration() override {}
+    void start_of_simulation() override {}
+    void end_of_simulation() override {}
 
     explicit sc_port_b(int n, sc_port_policy p) :
             sc_port_base(sc_gen_unique_name("port"), n, p)
@@ -195,7 +195,7 @@
 
     // Implementation defined, but depended on by the tests.
     int
-    vbind(sc_interface &i)
+    vbind(sc_interface &i) override
     {
         IF *interface = dynamic_cast<IF *>(&i);
         if (!interface)
@@ -204,7 +204,7 @@
         return 0;
     }
     int
-    vbind(sc_port_base &pb)
+    vbind(sc_port_base &pb) override
     {
         sc_port_b<IF> *p = dynamic_cast<sc_port_b<IF> *>(&pb);
         if (!p)
@@ -217,7 +217,7 @@
     std::vector<IF *> _interfaces;
 
     sc_interface *
-    _gem5Interface(int n) const
+    _gem5Interface(int n) const override
     {
         if (n < 0 || n >= size()) {
             report_error(SC_ID_GET_IF_, "index out of range");
@@ -226,7 +226,7 @@
         return _interfaces[n];
     }
     void
-    _gem5AddInterface(sc_interface *iface)
+    _gem5AddInterface(sc_interface *iface) override
     {
         IF *interface = dynamic_cast<IF *>(iface);
         sc_assert(interface);
@@ -239,7 +239,7 @@
         _interfaces.push_back(interface);
     }
 
-    const char *_ifTypeName() const { return typeid(IF).name(); }
+    const char *_ifTypeName() const override { return typeid(IF).name(); }
 
     // Disabled
     sc_port_b() {}
@@ -289,14 +289,14 @@
         sc_port_b<IF>::bind(parent);
     }
 
-    virtual const char *kind() const { return "sc_port"; }
+    virtual const char *kind() const override { return "sc_port"; }
 
   private:
     // Disabled
     sc_port(const sc_port<IF, N, P> &) {}
     sc_port<IF, N, P> &operator = (const sc_port<IF, N, P> &) { return *this; }
 
-    virtual sc_port_policy _portPolicy() const { return P; }
+    virtual sc_port_policy _portPolicy() const override { return P; }
 };
 
 } // namespace sc_core