From: Gabe Black Date: Sat, 26 Sep 2020 23:24:17 +0000 (-0700) Subject: base,mem: Use the standard [[deprecated]] attribute. X-Git-Tag: develop-gem5-snapshot~708 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3c31a214b68c3bab41341708dad1c972ea3f5a77;p=gem5.git base,mem: Use the standard [[deprecated]] attribute. The [[deprecated]] attribute is now standard, and so we don't need to wrap it in our own macro any more. Change-Id: I363df9a9c6b820dee8c21b1716335c0d15fbc62d Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35216 Maintainer: Gabe Black Reviewed-by: Nikos Nikoleris Reviewed-by: Daniel Carvalho Tested-by: kokoro --- diff --git a/src/base/compiler.hh b/src/base/compiler.hh index c2eb5d910..e28d45ee4 100644 --- a/src/base/compiler.hh +++ b/src/base/compiler.hh @@ -49,8 +49,6 @@ # define M5_VAR_USED __attribute__((unused)) # define M5_ATTR_PACKED __attribute__ ((__packed__)) # define M5_NO_INLINE __attribute__ ((__noinline__)) -# define M5_DEPRECATED __attribute__((deprecated)) -# define M5_DEPRECATED_MSG(MSG) __attribute__((deprecated(MSG))) # define M5_UNREACHABLE __builtin_unreachable() # define M5_PUBLIC __attribute__ ((visibility ("default"))) # define M5_LOCAL __attribute__ ((visibility ("hidden"))) diff --git a/src/mem/mem_object.hh b/src/mem/mem_object.hh index 7cce0c998..522083619 100644 --- a/src/mem/mem_object.hh +++ b/src/mem/mem_object.hh @@ -55,8 +55,8 @@ class MemObject : public ClockedObject { public: - M5_DEPRECATED_MSG( - "MemObject is deprecated. Use ClockedObject or SimObject instead") + [[deprecated( + "MemObject is deprecated. Use ClockedObject or SimObject instead")]] MemObject(const MemObjectParams *params) : ClockedObject(params) {} }; diff --git a/src/mem/port.hh b/src/mem/port.hh index c933af62b..357a10e82 100644 --- a/src/mem/port.hh +++ b/src/mem/port.hh @@ -245,7 +245,7 @@ class RequestPort: public Port, public AtomicRequestProtocol, } }; -class M5_DEPRECATED MasterPort : public RequestPort +class [[deprecated]] MasterPort : public RequestPort { public: MasterPort(const std::string& name, SimObject* _owner, @@ -449,7 +449,7 @@ class ResponsePort : public Port, public AtomicResponseProtocol, } }; -class M5_DEPRECATED SlavePort : public ResponsePort +class [[deprecated]] SlavePort : public ResponsePort { public: SlavePort(const std::string& name, SimObject* _owner,