sim: Inheritance fixes in varargs
authorNikos Nikoleris <nikos.nikoleris@arm.com>
Thu, 23 Apr 2020 19:05:57 +0000 (20:05 +0100)
committerNikos Nikoleris <nikos.nikoleris@arm.com>
Thu, 30 Apr 2020 09:14:42 +0000 (09:14 +0000)
Change-Id: I3c6027223893363df098d1990a4ad3d07c2ff5ff
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28250
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/sim/guest_abi/varargs.hh

index 6a19db806d16ba1549807cef5d15e666c1604044..07ed2a195c3a6bcc7846eb17dc669139f2af8978 100644 (file)
@@ -70,6 +70,8 @@ template <typename First, typename ...Types>
 class VarArgsBase<First, Types...> : public VarArgsBase<Types...>
 {
   public:
+    virtual ~VarArgsBase() = default;
+
     // The virtual function takes a reference parameter so that the different
     // _getImpl methods can co-exist through overloading.
     virtual void _getImpl(First &) = 0;
@@ -126,6 +128,8 @@ class VarArgsImpl<ABI, Base> : public Base
     // Declare state to pass to the Argument<>::get methods.
     ThreadContext *tc;
     typename ABI::State state;
+    // Make sure base class _getImpl-es don't get hidden by ours.
+    using Base::_getImpl;
 
     // Give the "using" statement in our subclass something to refer to.
     void _getImpl();