summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2015-10-12 04:08:01 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2015-10-12 04:08:01 -0400
commit2ac04c11accb46f92cf7f2b7abe40404dbf8c5d6 (patch)
tree368b579a0b45840a5248fca568f89a8ea7ca9d49 /src/sim
parent22c04190c607b9360d9a23548f8a54e83cf0e74a (diff)
downloadgem5-2ac04c11accb46f92cf7f2b7abe40404dbf8c5d6.tar.xz
misc: Add explicit overrides and fix other clang >= 3.5 issues
This patch adds explicit overrides as this is now required when using "-Wall" with clang >= 3.5, the latter now part of the most recent XCode. The patch consequently removes "virtual" for those methods where "override" is added. The latter should be enough of an indication. As part of this patch, a few minor issues that clang >= 3.5 complains about are also resolved (unused methods and variables).
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/clock_domain.hh2
-rw-r--r--src/sim/process.hh4
-rw-r--r--src/sim/root.hh2
-rw-r--r--src/sim/sim_events.hh10
-rw-r--r--src/sim/system.hh12
-rw-r--r--src/sim/ticked_object.hh2
-rw-r--r--src/sim/voltage_domain.hh4
7 files changed, 18 insertions, 18 deletions
diff --git a/src/sim/clock_domain.hh b/src/sim/clock_domain.hh
index cc26d7bbd..71627434a 100644
--- a/src/sim/clock_domain.hh
+++ b/src/sim/clock_domain.hh
@@ -237,7 +237,7 @@ class SrcClockDomain : public ClockDomain
return freqOpPoints[perf_level];
}
- void startup();
+ void startup() override;
void serialize(CheckpointOut &cp) const override;
void unserialize(CheckpointIn &cp) override;
diff --git a/src/sim/process.hh b/src/sim/process.hh
index b3a33bcd9..df007c9f2 100644
--- a/src/sim/process.hh
+++ b/src/sim/process.hh
@@ -120,7 +120,7 @@ class Process : public SimObject
// constructor
Process(ProcessParams *params);
- virtual void initState();
+ void initState() override;
DrainState drain() override;
@@ -156,7 +156,7 @@ class Process : public SimObject
void inheritFDArray(Process *p);
// override of virtual SimObject method: register statistics
- virtual void regStats();
+ void regStats() override;
// After getting registered with system object, tell process which
// system-wide context id it is assigned.
diff --git a/src/sim/root.hh b/src/sim/root.hh
index 4d9c63a6b..7273a077b 100644
--- a/src/sim/root.hh
+++ b/src/sim/root.hh
@@ -110,7 +110,7 @@ class Root : public SimObject
/** Schedule the timesync event at initState() when not unserializing
*/
- void initState();
+ void initState() override;
void serialize(CheckpointOut &cp) const override;
void unserialize(CheckpointIn &cp) override;
diff --git a/src/sim/sim_events.hh b/src/sim/sim_events.hh
index dbbc5174f..9a79a2e9d 100644
--- a/src/sim/sim_events.hh
+++ b/src/sim/sim_events.hh
@@ -88,9 +88,9 @@ class LocalSimLoopExitEvent : public Event
const std::string getCause() const { return cause; }
const int getCode() const { return code; }
- void process(); // process event
+ void process() override; // process event
- virtual const char *description() const;
+ const char *description() const override;
void serialize(CheckpointOut &cp) const override;
void unserialize(CheckpointIn &cp) override;
@@ -107,7 +107,7 @@ class CountedDrainEvent : public Event
public:
CountedDrainEvent();
- void process();
+ void process() override;
void setCount(int _count) { count = _count; }
@@ -128,9 +128,9 @@ class CountedExitEvent : public Event
public:
CountedExitEvent(const std::string &_cause, int &_downCounter);
- void process(); // process event
+ void process() override; // process event
- virtual const char *description() const;
+ const char *description() const override;
};
diff --git a/src/sim/system.hh b/src/sim/system.hh
index be0538839..c67f70219 100644
--- a/src/sim/system.hh
+++ b/src/sim/system.hh
@@ -97,9 +97,9 @@ class System : public MemObject
SystemPort(const std::string &_name, MemObject *_owner)
: MasterPort(_name, _owner)
{ }
- bool recvTimingResp(PacketPtr pkt)
+ bool recvTimingResp(PacketPtr pkt) override
{ panic("SystemPort does not receive timing!\n"); return false; }
- void recvReqRetry()
+ void recvReqRetry() override
{ panic("SystemPort does not expect retry!\n"); }
};
@@ -111,7 +111,7 @@ class System : public MemObject
* After all objects have been created and all ports are
* connected, check that the system port is connected.
*/
- virtual void init();
+ void init() override;
/**
* Get a reference to the system port that can be used by
@@ -127,7 +127,7 @@ class System : public MemObject
* Additional function to return the Port of a memory object.
*/
BaseMasterPort& getMasterPort(const std::string &if_name,
- PortID idx = InvalidPortID);
+ PortID idx = InvalidPortID) override;
/** @{ */
/**
@@ -335,7 +335,7 @@ class System : public MemObject
return masterIds.size();
}
- virtual void regStats();
+ void regStats() override;
/**
* Called by pseudo_inst to track the number of work items started by this
* system.
@@ -487,7 +487,7 @@ class System : public MemObject
System(Params *p);
~System();
- void initState();
+ void initState() override;
const Params *params() const { return (const Params *)_params; }
diff --git a/src/sim/ticked_object.hh b/src/sim/ticked_object.hh
index c3c6a0153..b21322670 100644
--- a/src/sim/ticked_object.hh
+++ b/src/sim/ticked_object.hh
@@ -198,7 +198,7 @@ class TickedObject : public ClockedObject, public Ticked
using ClockedObject::unserialize;
/** Pass on regStats, serialize etc. onto Ticked */
- void regStats();
+ void regStats() override;
void serialize(CheckpointOut &cp) const override;
void unserialize(CheckpointIn &cp) override;
};
diff --git a/src/sim/voltage_domain.hh b/src/sim/voltage_domain.hh
index d22556083..e7e4f8180 100644
--- a/src/sim/voltage_domain.hh
+++ b/src/sim/voltage_domain.hh
@@ -111,7 +111,7 @@ class VoltageDomain : public SimObject
* Startup has all SrcClockDomains registered with this voltage domain, so
* try to make sure that all perf level requests from them are met.
*/
- void startup();
+ void startup() override;
/**
* Recomputes the highest (fastest, i.e., numerically lowest) requested
@@ -126,7 +126,7 @@ class VoltageDomain : public SimObject
*/
bool sanitiseVoltages();
- void regStats();
+ void regStats() override;
void serialize(CheckpointOut &cp) const override;
void unserialize(CheckpointIn &cp) override;