summaryrefslogtreecommitdiff
path: root/src/mem/mem_object.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2019-09-06 16:35:26 -0700
committerGabe Black <gabeblack@google.com>2019-09-10 03:39:57 +0000
commit9b9045bb67ac5f2cfa3306607635f347a3ee2f27 (patch)
tree8e80f2d5e630ab9daeeb0410336073e6caea793c /src/mem/mem_object.hh
parenta04da61ce1b8fa131da08894e1beaf7b81771f8e (diff)
downloadgem5-9b9045bb67ac5f2cfa3306607635f347a3ee2f27.tar.xz
mem: Mark MemObject as deprecated.
It's constructor will now warn that it's deprecated and suggest using ClockedObject directly. This change also gets rid of the params() method and the Params typedef since they are functionally equivalent to the ClockedObject versions. It also removes the include of mem/port.hh which is not used in mem_object.hh. This may break code which purposefully or (more likely) accidentally depended on that transitive include from mem_object.hh. Change-Id: I6dab3ba626e3f3ab6a6bd86edcf4f5cb4d6d2c45 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20720 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/mem/mem_object.hh')
-rw-r--r--src/mem/mem_object.hh10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mem/mem_object.hh b/src/mem/mem_object.hh
index 3ae9c4adf..2a2bca14a 100644
--- a/src/mem/mem_object.hh
+++ b/src/mem/mem_object.hh
@@ -49,7 +49,6 @@
#ifndef __MEM_MEM_OBJECT_HH__
#define __MEM_MEM_OBJECT_HH__
-#include "mem/port.hh"
#include "params/MemObject.hh"
#include "sim/clocked_object.hh"
@@ -59,11 +58,10 @@
class MemObject : public ClockedObject
{
public:
- typedef MemObjectParams Params;
- const Params *params() const
- { return dynamic_cast<const Params *>(_params); }
-
- MemObject(const Params *params);
+ M5_DEPRECATED_MSG(
+ "MemObject is deprecated. Use ClockedObject or SimObject instead")
+ MemObject(const MemObjectParams *params) : ClockedObject(params)
+ {}
};
#endif //__MEM_MEM_OBJECT_HH__