From: Daniel R. Carvalho Date: Sat, 3 Aug 2019 10:04:14 +0000 (+0200) Subject: mem-cache: Fix non-virtual base destructor of Repl Entry X-Git-Tag: v19.0.0.0~688 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e33b3aa6692b172f6db5957774a9e0289e81fa5b;p=gem5.git mem-cache: Fix non-virtual base destructor of Repl Entry ReplaceableEntry contains a virtual method, yet its destructor was not virtual, causing errors in some compilers. Change-Id: I13deec843f4007d9deb924882a8d98ff6a89c84f Signed-off-by: Daniel R. Carvalho Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19808 Reviewed-by: Nikos Nikoleris Maintainer: Nikos Nikoleris Tested-by: kokoro --- diff --git a/src/mem/cache/replacement_policies/replaceable_entry.hh b/src/mem/cache/replacement_policies/replaceable_entry.hh index dffa4cf10..c558beea1 100644 --- a/src/mem/cache/replacement_policies/replaceable_entry.hh +++ b/src/mem/cache/replacement_policies/replaceable_entry.hh @@ -63,12 +63,15 @@ class ReplaceableEntry */ uint32_t _way; - public: - /** - * Replacement data associated to this entry. - * It must be instantiated by the replacement policy before being used. - */ - std::shared_ptr replacementData; + public: + ReplaceableEntry() = default; + virtual ~ReplaceableEntry() = default; + + /** + * Replacement data associated to this entry. + * It must be instantiated by the replacement policy before being used. + */ + std::shared_ptr replacementData; /** * Set both the set and way. Should be called only once.