summaryrefslogtreecommitdiff
path: root/src/cpu/simple/atomic.hh
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/cpu/simple/atomic.hh
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/cpu/simple/atomic.hh')
-rw-r--r--src/cpu/simple/atomic.hh23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/cpu/simple/atomic.hh b/src/cpu/simple/atomic.hh
index 372df7cbd..1a2f19949 100644
--- a/src/cpu/simple/atomic.hh
+++ b/src/cpu/simple/atomic.hh
@@ -55,7 +55,7 @@ class AtomicSimpleCPU : public BaseSimpleCPU
AtomicSimpleCPU(AtomicSimpleCPUParams *params);
virtual ~AtomicSimpleCPU();
- virtual void init();
+ void init() override;
private:
@@ -181,10 +181,10 @@ class AtomicSimpleCPU : public BaseSimpleCPU
protected:
/** Return a reference to the data port. */
- virtual MasterPort &getDataPort() { return dcachePort; }
+ MasterPort &getDataPort() override { return dcachePort; }
/** Return a reference to the instruction port. */
- virtual MasterPort &getInstPort() { return icachePort; }
+ MasterPort &getInstPort() override { return icachePort; }
/** Perform snoop for other cpu-local thread contexts. */
void threadSnoop(PacketPtr pkt, ThreadID sender);
@@ -194,20 +194,21 @@ class AtomicSimpleCPU : public BaseSimpleCPU
DrainState drain() override;
void drainResume() override;
- void switchOut();
- void takeOverFrom(BaseCPU *oldCPU);
+ void switchOut() override;
+ void takeOverFrom(BaseCPU *oldCPU) override;
- void verifyMemoryMode() const;
+ void verifyMemoryMode() const override;
- virtual void activateContext(ThreadID thread_num);
- virtual void suspendContext(ThreadID thread_num);
+ void activateContext(ThreadID thread_num) override;
+ void suspendContext(ThreadID thread_num) override;
- Fault readMem(Addr addr, uint8_t *data, unsigned size, unsigned flags);
+ Fault readMem(Addr addr, uint8_t *data, unsigned size,
+ unsigned flags) override;
Fault writeMem(uint8_t *data, unsigned size,
- Addr addr, unsigned flags, uint64_t *res);
+ Addr addr, unsigned flags, uint64_t *res) override;
- virtual void regProbePoints();
+ void regProbePoints() override;
/**
* Print state of address in memory system via PrintReq (for