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.
This commit is contained in:
Brandon Potter
2017-02-27 13:18:38 -05:00
parent 8d2c3735d9
commit 833fb10ed4
2 changed files with 13 additions and 13 deletions

View File

@@ -54,7 +54,7 @@ namespace HsailISA
{ {
public: public:
HsailGPUStaticInst(const BrigObject *obj, const std::string &opcode); HsailGPUStaticInst(const BrigObject *obj, const std::string &opcode);
void generateDisassembly(); void generateDisassembly() override;
int instSize() const override { return sizeof(RawMachInst); } int instSize() const override { return sizeof(RawMachInst); }
bool isValid() const override { return true; } bool isValid() const override { return true; }

View File

@@ -271,24 +271,24 @@ class KernelLaunchStaticInst : public GPUStaticInst
} }
void void
execute(GPUDynInstPtr gpuDynInst) execute(GPUDynInstPtr gpuDynInst) override
{ {
fatal("kernel launch instruction should not be executed\n"); fatal("kernel launch instruction should not be executed\n");
} }
void void
generateDisassembly() generateDisassembly() override
{ {
disassembly = opcode; disassembly = opcode;
} }
int getNumOperands() { return 0; } int getNumOperands() override { return 0; }
bool isCondRegister(int operandIndex) { return false; } bool isCondRegister(int operandIndex) override { return false; }
bool isScalarRegister(int operandIndex) { return false; } bool isScalarRegister(int operandIndex) override { return false; }
bool isVectorRegister(int operandIndex) { return false; } bool isVectorRegister(int operandIndex) override { return false; }
bool isSrcOperand(int operandIndex) { return false; } bool isSrcOperand(int operandIndex) override { return false; }
bool isDstOperand(int operandIndex) { return false; } bool isDstOperand(int operandIndex) override { return false; }
int getOperandSize(int operandIndex) { return 0; } int getOperandSize(int operandIndex) override { return 0; }
int int
getRegisterIndex(int operandIndex, GPUDynInstPtr gpuDynInst) override getRegisterIndex(int operandIndex, GPUDynInstPtr gpuDynInst) override
@@ -296,9 +296,9 @@ class KernelLaunchStaticInst : public GPUStaticInst
return 0; return 0;
} }
int numDstRegOperands() { return 0; } int numDstRegOperands() override { return 0; }
int numSrcRegOperands() { return 0; } int numSrcRegOperands() override { return 0; }
bool isValid() const { return true; } bool isValid() const override { return true; }
int instSize() const override { return 0; } int instSize() const override { return 0; }
}; };