summaryrefslogtreecommitdiff
path: root/tools/lli
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2014-03-08 08:27:28 +0000
committerCraig Topper <craig.topper@gmail.com>2014-03-08 08:27:28 +0000
commitc83e68f7326f424876198514eb2ad89110f52c45 (patch)
treebfc2d328801ff1f8ec2206613c4e3f8e429a500a /tools/lli
parent838cb749dceb62a35d1966833f1a577cd61938ad (diff)
downloadllvm-c83e68f7326f424876198514eb2ad89110f52c45.tar.gz
llvm-c83e68f7326f424876198514eb2ad89110f52c45.tar.bz2
llvm-c83e68f7326f424876198514eb2ad89110f52c45.tar.xz
[C++11] Add 'override' keyword to virtual methods that override their base class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203345 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lli')
-rw-r--r--tools/lli/RemoteMemoryManager.h39
-rw-r--r--tools/lli/RemoteTargetExternal.h17
-rw-r--r--tools/lli/lli.cpp4
3 files changed, 31 insertions, 29 deletions
diff --git a/tools/lli/RemoteMemoryManager.h b/tools/lli/RemoteMemoryManager.h
index b9691f4470..11f600f3c7 100644
--- a/tools/lli/RemoteMemoryManager.h
+++ b/tools/lli/RemoteMemoryManager.h
@@ -67,45 +67,48 @@ public:
virtual ~RemoteMemoryManager();
uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment,
- unsigned SectionID, StringRef SectionName);
+ unsigned SectionID,
+ StringRef SectionName) override;
uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment,
unsigned SectionID, StringRef SectionName,
- bool IsReadOnly);
+ bool IsReadOnly) override;
// For now, remote symbol resolution is not support in lli. The MCJIT
// interface does support this, but clients must provide their own
// mechanism for finding remote symbol addresses. MCJIT will resolve
// symbols from Modules it contains.
- uint64_t getSymbolAddress(const std::string &Name) { return 0; }
+ uint64_t getSymbolAddress(const std::string &Name) override { return 0; }
- void notifyObjectLoaded(ExecutionEngine *EE, const ObjectImage *Obj);
+ void notifyObjectLoaded(ExecutionEngine *EE, const ObjectImage *Obj) override;
- bool finalizeMemory(std::string *ErrMsg);
+ bool finalizeMemory(std::string *ErrMsg) override;
// For now, remote EH frame registration isn't supported. Remote symbol
// resolution is a prerequisite to supporting remote EH frame registration.
- void registerEHFrames(uint8_t *Addr, uint64_t LoadAddr, size_t Size) {}
- void deregisterEHFrames(uint8_t *Addr, uint64_t LoadAddr, size_t Size) {}
+ void registerEHFrames(uint8_t *Addr, uint64_t LoadAddr,
+ size_t Size) override {}
+ void deregisterEHFrames(uint8_t *Addr, uint64_t LoadAddr,
+ size_t Size) override {}
// This is a non-interface function used by lli
void setRemoteTarget(RemoteTarget *T) { Target = T; }
// The following obsolete JITMemoryManager calls are stubbed out for
// this model.
- void setMemoryWritable();
- void setMemoryExecutable();
- void setPoisonMemory(bool poison);
- void AllocateGOT();
- uint8_t *getGOTBase() const;
- uint8_t *startFunctionBody(const Function *F, uintptr_t &ActualSize);
+ void setMemoryWritable() override;
+ void setMemoryExecutable() override;
+ void setPoisonMemory(bool poison) override;
+ void AllocateGOT() override;
+ uint8_t *getGOTBase() const override;
+ uint8_t *startFunctionBody(const Function *F, uintptr_t &ActualSize) override;
uint8_t *allocateStub(const GlobalValue* F, unsigned StubSize,
- unsigned Alignment);
+ unsigned Alignment) override;
void endFunctionBody(const Function *F, uint8_t *FunctionStart,
- uint8_t *FunctionEnd);
- uint8_t *allocateSpace(intptr_t Size, unsigned Alignment);
- uint8_t *allocateGlobal(uintptr_t Size, unsigned Alignment);
- void deallocateFunctionBody(void *Body);
+ uint8_t *FunctionEnd) override;
+ uint8_t *allocateSpace(intptr_t Size, unsigned Alignment) override;
+ uint8_t *allocateGlobal(uintptr_t Size, unsigned Alignment) override;
+ void deallocateFunctionBody(void *Body) override;
};
} // end namespace llvm
diff --git a/tools/lli/RemoteTargetExternal.h b/tools/lli/RemoteTargetExternal.h
index 587849b906..f87fc6199f 100644
--- a/tools/lli/RemoteTargetExternal.h
+++ b/tools/lli/RemoteTargetExternal.h
@@ -46,9 +46,8 @@ public:
///
/// @returns True on success. On failure, ErrorMsg is updated with
/// descriptive text of the encountered error.
- virtual bool allocateSpace(size_t Size,
- unsigned Alignment,
- uint64_t &Address);
+ bool allocateSpace(size_t Size, unsigned Alignment,
+ uint64_t &Address) override;
/// Load data into the target address space.
///
@@ -58,7 +57,7 @@ public:
///
/// @returns True on success. On failure, ErrorMsg is updated with
/// descriptive text of the encountered error.
- virtual bool loadData(uint64_t Address, const void *Data, size_t Size);
+ bool loadData(uint64_t Address, const void *Data, size_t Size) override;
/// Load code into the target address space and prepare it for execution.
///
@@ -68,7 +67,7 @@ public:
///
/// @returns True on success. On failure, ErrorMsg is updated with
/// descriptive text of the encountered error.
- virtual bool loadCode(uint64_t Address, const void *Data, size_t Size);
+ bool loadCode(uint64_t Address, const void *Data, size_t Size) override;
/// Execute code in the target process. The called function is required
/// to be of signature int "(*)(void)".
@@ -79,16 +78,16 @@ public:
///
/// @returns True on success. On failure, ErrorMsg is updated with
/// descriptive text of the encountered error.
- virtual bool executeCode(uint64_t Address, int &RetVal);
+ bool executeCode(uint64_t Address, int &RetVal) override;
/// Minimum alignment for memory permissions. Used to separate code and
/// data regions to make sure data doesn't get marked as code or vice
/// versa.
///
/// @returns Page alignment return value. Default of 4k.
- virtual unsigned getPageAlignment() { return 4096; }
+ unsigned getPageAlignment() override { return 4096; }
- virtual bool create() {
+ bool create() override {
RPC.ChildName = ChildName;
if (!RPC.createServer())
return true;
@@ -104,7 +103,7 @@ public:
}
/// Terminate the remote process.
- virtual void stop();
+ void stop() override;
RemoteTargetExternal(std::string &Name) : RemoteTarget(), ChildName(Name) {}
virtual ~RemoteTargetExternal() {}
diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp
index a9125a48b8..c0c0f9d2b2 100644
--- a/tools/lli/lli.cpp
+++ b/tools/lli/lli.cpp
@@ -262,7 +262,7 @@ public:
}
virtual ~LLIObjectCache() {}
- virtual void notifyObjectCompiled(const Module *M, const MemoryBuffer *Obj) {
+ void notifyObjectCompiled(const Module *M, const MemoryBuffer *Obj) override {
const std::string ModuleID = M->getModuleIdentifier();
std::string CacheName;
if (!getCacheFilename(ModuleID, CacheName))
@@ -278,7 +278,7 @@ public:
outfile.close();
}
- virtual MemoryBuffer* getObject(const Module* M) {
+ MemoryBuffer* getObject(const Module* M) override {
const std::string ModuleID = M->getModuleIdentifier();
std::string CacheName;
if (!getCacheFilename(ModuleID, CacheName))