summaryrefslogtreecommitdiff
path: root/src/systemc/ext
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2019-11-27 04:11:52 -0800
committerGabe Black <gabeblack@google.com>2019-12-03 00:17:02 +0000
commit78e5caef696b017b15447c2a12311e94961cfdb4 (patch)
treeb297b48c60c4f77cf7d799668faa343dc39c3d90 /src/systemc/ext
parentfd36873411ef212199dfdbf35be51e01f1da1b67 (diff)
downloadgem5-78e5caef696b017b15447c2a12311e94961cfdb4.tar.xz
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>
Diffstat (limited to 'src/systemc/ext')
-rw-r--r--src/systemc/ext/core/sc_export.hh10
-rw-r--r--src/systemc/ext/core/sc_port.hh22
2 files changed, 16 insertions, 16 deletions
diff --git a/src/systemc/ext/core/sc_export.hh b/src/systemc/ext/core/sc_export.hh
index 100ce66db..fcbcd31ab 100644
--- a/src/systemc/ext/core/sc_export.hh
+++ b/src/systemc/ext/core/sc_export.hh
@@ -70,7 +70,7 @@ class sc_export : public sc_export_base
{}
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 @@ class sc_export : public sc_export_base
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 @@ class sc_export : public sc_export_base
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 99e7ace2d..7399a1691 100644
--- a/src/systemc/ext/core/sc_port.hh
+++ b/src/systemc/ext/core/sc_port.hh
@@ -180,10 +180,10 @@ class sc_port_b : public sc_port_base
}
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 @@ class sc_port_b : public sc_port_base
// 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 @@ class sc_port_b : public sc_port_base
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 @@ class sc_port_b : public sc_port_base
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 @@ class sc_port_b : public sc_port_base
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 @@ class sc_port_b : public sc_port_base
_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 @@ class sc_port : public sc_port_b<IF>
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