DIBuilder: support structs with vtable pointers in the same way as classes
[oota-llvm.git] / include / llvm / ExecutionEngine / JITMemoryManager.h
index 8eb7590a21afd057fb5d5e3189547cba359bbc7d..714a98055a42af84dd06e05811555fef7568f88e 100644 (file)
@@ -7,9 +7,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_EXECUTION_ENGINE_JIT_MEMMANAGER_H
-#define LLVM_EXECUTION_ENGINE_JIT_MEMMANAGER_H
+#ifndef LLVM_EXECUTIONENGINE_JITMEMORYMANAGER_H
+#define LLVM_EXECUTIONENGINE_JITMEMORYMANAGER_H
 
+#include "llvm/ExecutionEngine/RuntimeDyld.h"
 #include "llvm/Support/DataTypes.h"
 #include <string>
 
@@ -22,7 +23,7 @@ namespace llvm {
 /// memory for the code generated by the JIT.  This can be reimplemented by
 /// clients that have a strong desire to control how the layout of JIT'd memory
 /// works.
-class JITMemoryManager {
+class JITMemoryManager : public RTDyldMemoryManager {
 protected:
   bool HasGOT;
 
@@ -101,22 +102,6 @@ public:
   virtual void endFunctionBody(const Function *F, uint8_t *FunctionStart,
                                uint8_t *FunctionEnd) = 0;
 
-  /// allocateCodeSection - Allocate a memory block of (at least) the given
-  /// size suitable for executable code. The SectionID is a unique identifier
-  /// assigned by the JIT and passed through to the memory manager for
-  /// the instance class to use if it needs to communicate to the JIT about
-  /// a given section after the fact.
-  virtual uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment,
-                                       unsigned SectionID) = 0;
-
-  /// allocateDataSection - Allocate a memory block of (at least) the given
-  /// size suitable for data. The SectionID is a unique identifier
-  /// assigned by the JIT and passed through to the memory manager for
-  /// the instance class to use if it needs to communicate to the JIT about
-  /// a given section after the fact.
-  virtual uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment,
-                                       unsigned SectionID) = 0;
-
   /// allocateSpace - Allocate a memory block of the given size.  This method
   /// cannot be called between calls to startFunctionBody and endFunctionBody.
   virtual uint8_t *allocateSpace(intptr_t Size, unsigned Alignment) = 0;