Use 'override/final' instead of 'virtual' for overridden methods
[oota-llvm.git] / tools / lli / RemoteMemoryManager.h
index 11f600f3c731b807bbed54cecc7485b886344bc5..5733fa53f3e43a4ca7978754a92b68af9ad3bfb0 100644 (file)
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef REMOTEMEMORYMANAGER_H
-#define REMOTEMEMORYMANAGER_H
+#ifndef LLVM_TOOLS_LLI_REMOTEMEMORYMANAGER_H
+#define LLVM_TOOLS_LLI_REMOTEMEMORYMANAGER_H
 
 #include "RemoteTarget.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/SmallVector.h"
-#include "llvm/ExecutionEngine/JITMemoryManager.h"
+#include "llvm/ExecutionEngine/RTDyldMemoryManager.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/Memory.h"
 #include <utility>
 
 namespace llvm {
 
-class RemoteMemoryManager : public JITMemoryManager {
+class RemoteMemoryManager : public RTDyldMemoryManager {
 public:
   // Notice that this structure takes ownership of the memory allocated.
   struct Allocation {
@@ -63,8 +63,8 @@ private:
   RemoteTarget *Target;
 
 public:
-  RemoteMemoryManager() : Target(NULL) {}
-  virtual ~RemoteMemoryManager();
+  RemoteMemoryManager() : Target(nullptr) {}
+  ~RemoteMemoryManager() override;
 
   uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment,
                                unsigned SectionID,
@@ -80,7 +80,8 @@ public:
   // symbols from Modules it contains.
   uint64_t getSymbolAddress(const std::string &Name) override { return 0; }
 
-  void notifyObjectLoaded(ExecutionEngine *EE, const ObjectImage *Obj) override;
+  void notifyObjectLoaded(ExecutionEngine *EE,
+                          const object::ObjectFile &Obj) override;
 
   bool finalizeMemory(std::string *ErrMsg) override;
 
@@ -93,22 +94,6 @@ public:
 
   // 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() 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) override;
-  void endFunctionBody(const Function *F, uint8_t *FunctionStart,
-                       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