From 838cb749dceb62a35d1966833f1a577cd61938ad Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Sat, 8 Mar 2014 07:51:20 +0000 Subject: [C++11] Add 'override' keyword to virtual methods that override their base class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203344 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/ExecutionEngine/JIT/JITEmitter.cpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'lib/ExecutionEngine/JIT/JITEmitter.cpp') diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp index b0e48cae18..4b2f012eaf 100644 --- a/lib/ExecutionEngine/JIT/JITEmitter.cpp +++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp @@ -375,8 +375,8 @@ namespace { JITResolver &getJITResolver() { return Resolver; } - virtual void startFunction(MachineFunction &F); - virtual bool finishFunction(MachineFunction &F); + void startFunction(MachineFunction &F) override; + bool finishFunction(MachineFunction &F) override; void emitConstantPool(MachineConstantPool *MCP); void initJumpTableInfo(MachineJumpTableInfo *MJTI); @@ -386,24 +386,23 @@ namespace { unsigned StubSize, unsigned Alignment = 1); void startGVStub(void *Buffer, unsigned StubSize); void finishGVStub(); - virtual void *allocIndirectGV(const GlobalValue *GV, - const uint8_t *Buffer, size_t Size, - unsigned Alignment); + void *allocIndirectGV(const GlobalValue *GV, const uint8_t *Buffer, + size_t Size, unsigned Alignment) override; /// allocateSpace - Reserves space in the current block if any, or /// allocate a new one of the given size. - virtual void *allocateSpace(uintptr_t Size, unsigned Alignment); + void *allocateSpace(uintptr_t Size, unsigned Alignment) override; /// allocateGlobal - Allocate memory for a global. Unlike allocateSpace, /// this method does not allocate memory in the current output buffer, /// because a global may live longer than the current function. - virtual void *allocateGlobal(uintptr_t Size, unsigned Alignment); + void *allocateGlobal(uintptr_t Size, unsigned Alignment) override; - virtual void addRelocation(const MachineRelocation &MR) { + void addRelocation(const MachineRelocation &MR) override { Relocations.push_back(MR); } - virtual void StartMachineBasicBlock(MachineBasicBlock *MBB) { + void StartMachineBasicBlock(MachineBasicBlock *MBB) override { if (MBBLocations.size() <= (unsigned)MBB->getNumber()) MBBLocations.resize((MBB->getNumber()+1)*2); MBBLocations[MBB->getNumber()] = getCurrentPCValue(); @@ -414,10 +413,11 @@ namespace { << (void*) getCurrentPCValue() << "]\n"); } - virtual uintptr_t getConstantPoolEntryAddress(unsigned Entry) const; - virtual uintptr_t getJumpTableEntryAddress(unsigned Entry) const; + uintptr_t getConstantPoolEntryAddress(unsigned Entry) const override; + uintptr_t getJumpTableEntryAddress(unsigned Entry) const override; - virtual uintptr_t getMachineBasicBlockAddress(MachineBasicBlock *MBB) const{ + uintptr_t + getMachineBasicBlockAddress(MachineBasicBlock *MBB) const override { assert(MBBLocations.size() > (unsigned)MBB->getNumber() && MBBLocations[MBB->getNumber()] && "MBB not emitted!"); return MBBLocations[MBB->getNumber()]; @@ -432,22 +432,22 @@ namespace { /// function body. void deallocateMemForFunction(const Function *F); - virtual void processDebugLoc(DebugLoc DL, bool BeforePrintingInsn); + void processDebugLoc(DebugLoc DL, bool BeforePrintingInsn) override; - virtual void emitLabel(MCSymbol *Label) { + void emitLabel(MCSymbol *Label) override { LabelLocations[Label] = getCurrentPCValue(); } - virtual DenseMap *getLabelLocations() { + DenseMap *getLabelLocations() override { return &LabelLocations; } - virtual uintptr_t getLabelAddress(MCSymbol *Label) const { + uintptr_t getLabelAddress(MCSymbol *Label) const override { assert(LabelLocations.count(Label) && "Label not emitted!"); return LabelLocations.find(Label)->second; } - virtual void setModuleInfo(MachineModuleInfo* Info) { + void setModuleInfo(MachineModuleInfo* Info) override { MMI = Info; } -- cgit v1.2.3