diff --git a/llvm/utils/benchmark/include/benchmark/benchmark.h b/llvm/utils/benchmark/include/benchmark/benchmark.h index 3b535f1b7d52..528aa7f9c8bb 100644 --- a/llvm/utils/benchmark/include/benchmark/benchmark.h +++ b/llvm/utils/benchmark/include/benchmark/benchmark.h @@ -952,7 +952,7 @@ class FunctionBenchmark : public Benchmark { FunctionBenchmark(const char* name, Function* func) : Benchmark(name), func_(func) {} - virtual void Run(State& st); + void Run(State& st) override; private: Function* func_; @@ -962,7 +962,7 @@ class FunctionBenchmark : public Benchmark { template class LambdaBenchmark : public Benchmark { public: - virtual void Run(State& st) { lambda_(st); } + void Run(State& st) override { lambda_(st); } private: template @@ -1013,7 +1013,7 @@ class Fixture : public internal::Benchmark { public: Fixture() : internal::Benchmark("") {} - virtual void Run(State& st) { + void Run(State& st) override { this->SetUp(st); this->BenchmarkCase(st); this->TearDown(st); @@ -1399,8 +1399,8 @@ public: : output_options_(opts_), name_field_width_(0), prev_counters_(), printed_header_(false) {} - virtual bool ReportContext(const Context& context); - virtual void ReportRuns(const std::vector& reports); + bool ReportContext(const Context& context) override; + void ReportRuns(const std::vector& reports) override; protected: virtual void PrintRunData(const Run& report); @@ -1415,9 +1415,9 @@ public: class JSONReporter : public BenchmarkReporter { public: JSONReporter() : first_report_(true) {} - virtual bool ReportContext(const Context& context); - virtual void ReportRuns(const std::vector& reports); - virtual void Finalize(); + bool ReportContext(const Context& context) override; + void ReportRuns(const std::vector& reports) override; + void Finalize() override; private: void PrintRunData(const Run& report); @@ -1428,8 +1428,8 @@ class JSONReporter : public BenchmarkReporter { class CSVReporter : public BenchmarkReporter { public: CSVReporter() : printed_header_(false) {} - virtual bool ReportContext(const Context& context); - virtual void ReportRuns(const std::vector& reports); + bool ReportContext(const Context& context) override; + void ReportRuns(const std::vector& reports) override; private: void PrintRunData(const Run& report);