cpu-kvm: Add missing 'override' keyword
authorHoa Nguyen <hoanguyen@ucdavis.edu>
Mon, 3 Aug 2020 22:03:51 +0000 (15:03 -0700)
committerHoa Nguyen <hoanguyen@ucdavis.edu>
Tue, 4 Aug 2020 23:02:02 +0000 (23:02 +0000)
clang requires all functions that override a member function to be
masked by the 'override' keyword. The missing 'override' in
timer.hh causes compiling issues while compiling gem5 with clang.
This commit adds the missing keyword.

Jira: https://gem5.atlassian.net/browse/GEM5-724

Change-Id: I3b5c7af666927b079a785803c8bb4869180ff777
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32095
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/cpu/kvm/timer.hh

index 376ba7c1adeecde2870b22cfdecbc1e6bec31ddb..7daa3cdd710824eb62dfc320b99a6c2d9c00cd49 100644 (file)
@@ -194,12 +194,12 @@ class PosixKvmTimer : public BaseKvmTimer
                   float hostFactor, Tick hostFreq);
     ~PosixKvmTimer();
 
-    void arm(Tick ticks);
-    void disarm();
+    void arm(Tick ticks) override;
+    void disarm() override;
     bool expired() override;
 
   protected:
-    Tick calcResolution();
+    Tick calcResolution() override;
 
   private:
     clockid_t clockID;