From: Brandon Potter Date: Mon, 27 Feb 2017 18:18:38 +0000 (-0500) Subject: gpu-compute: mark functions with override if replacing virtual X-Git-Tag: v19.0.0.0~2937 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=833fb10ed48ea3bcd7dff5ae0768a119db415f4e;p=gem5.git gpu-compute: mark functions with override if replacing virtual The clang compiler is more stringent than the recent versions of GCC when dealing with overrides. This changeset adds the specifier to the methods which need it to silence the compiler. --- diff --git a/src/arch/hsail/insts/gpu_static_inst.hh b/src/arch/hsail/insts/gpu_static_inst.hh index bb40411ed..0bddcac80 100644 --- a/src/arch/hsail/insts/gpu_static_inst.hh +++ b/src/arch/hsail/insts/gpu_static_inst.hh @@ -54,7 +54,7 @@ namespace HsailISA { public: HsailGPUStaticInst(const BrigObject *obj, const std::string &opcode); - void generateDisassembly(); + void generateDisassembly() override; int instSize() const override { return sizeof(RawMachInst); } bool isValid() const override { return true; } diff --git a/src/gpu-compute/gpu_static_inst.hh b/src/gpu-compute/gpu_static_inst.hh index 372eee8df..23a14f5a7 100644 --- a/src/gpu-compute/gpu_static_inst.hh +++ b/src/gpu-compute/gpu_static_inst.hh @@ -271,24 +271,24 @@ class KernelLaunchStaticInst : public GPUStaticInst } void - execute(GPUDynInstPtr gpuDynInst) + execute(GPUDynInstPtr gpuDynInst) override { fatal("kernel launch instruction should not be executed\n"); } void - generateDisassembly() + generateDisassembly() override { disassembly = opcode; } - int getNumOperands() { return 0; } - bool isCondRegister(int operandIndex) { return false; } - bool isScalarRegister(int operandIndex) { return false; } - bool isVectorRegister(int operandIndex) { return false; } - bool isSrcOperand(int operandIndex) { return false; } - bool isDstOperand(int operandIndex) { return false; } - int getOperandSize(int operandIndex) { return 0; } + int getNumOperands() override { return 0; } + bool isCondRegister(int operandIndex) override { return false; } + bool isScalarRegister(int operandIndex) override { return false; } + bool isVectorRegister(int operandIndex) override { return false; } + bool isSrcOperand(int operandIndex) override { return false; } + bool isDstOperand(int operandIndex) override { return false; } + int getOperandSize(int operandIndex) override { return 0; } int getRegisterIndex(int operandIndex, GPUDynInstPtr gpuDynInst) override @@ -296,9 +296,9 @@ class KernelLaunchStaticInst : public GPUStaticInst return 0; } - int numDstRegOperands() { return 0; } - int numSrcRegOperands() { return 0; } - bool isValid() const { return true; } + int numDstRegOperands() override { return 0; } + int numSrcRegOperands() override { return 0; } + bool isValid() const override { return true; } int instSize() const override { return 0; } };