aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine/MCJIT/MCJIT.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ExecutionEngine/MCJIT/MCJIT.h')
-rw-r--r--lib/ExecutionEngine/MCJIT/MCJIT.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/lib/ExecutionEngine/MCJIT/MCJIT.h b/lib/ExecutionEngine/MCJIT/MCJIT.h
index bc943b9..de4a8f6 100644
--- a/lib/ExecutionEngine/MCJIT/MCJIT.h
+++ b/lib/ExecutionEngine/MCJIT/MCJIT.h
@@ -15,7 +15,7 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/ExecutionEngine/ExecutionEngine.h"
#include "llvm/ExecutionEngine/ObjectCache.h"
-#include "llvm/ExecutionEngine/ObjectImage.h"
+#include "llvm/ExecutionEngine/ObjectMemoryBuffer.h"
#include "llvm/ExecutionEngine/RuntimeDyld.h"
#include "llvm/IR/Module.h"
@@ -28,8 +28,9 @@ class MCJIT;
// to that object.
class LinkingMemoryManager : public RTDyldMemoryManager {
public:
- LinkingMemoryManager(MCJIT *Parent, RTDyldMemoryManager *MM)
- : ParentEngine(Parent), ClientMM(MM) {}
+ LinkingMemoryManager(MCJIT *Parent,
+ std::unique_ptr<RTDyldMemoryManager> MM)
+ : ParentEngine(Parent), ClientMM(std::move(MM)) {}
uint64_t getSymbolAddress(const std::string &Name) override;
@@ -57,7 +58,7 @@ public:
}
void notifyObjectLoaded(ExecutionEngine *EE,
- const ObjectImage *Obj) override {
+ const object::ObjectFile &Obj) override {
ClientMM->notifyObjectLoaded(EE, Obj);
}
@@ -102,7 +103,7 @@ private:
class MCJIT : public ExecutionEngine {
MCJIT(std::unique_ptr<Module> M, std::unique_ptr<TargetMachine> tm,
- RTDyldMemoryManager *MemMgr);
+ std::unique_ptr<RTDyldMemoryManager> MemMgr);
typedef llvm::SmallPtrSet<Module *, 4> ModulePtrSet;
@@ -222,7 +223,7 @@ class MCJIT : public ExecutionEngine {
SmallVector<object::OwningBinary<object::Archive>, 2> Archives;
SmallVector<std::unique_ptr<MemoryBuffer>, 2> Buffers;
- SmallVector<std::unique_ptr<ObjectImage>, 2> LoadedObjects;
+ SmallVector<std::unique_ptr<object::ObjectFile>, 2> LoadedObjects;
// An optional ObjectCache to be notified of compiled objects and used to
// perform lookup of pre-compiled code to avoid re-compilation.
@@ -325,7 +326,7 @@ public:
static ExecutionEngine *createJIT(std::unique_ptr<Module> M,
std::string *ErrorStr,
- RTDyldMemoryManager *MemMgr,
+ std::unique_ptr<RTDyldMemoryManager> MemMgr,
std::unique_ptr<TargetMachine> TM);
// @}
@@ -341,10 +342,11 @@ protected:
/// this function call is expected to be the contained module. The module
/// is passed as a parameter here to prepare for multiple module support in
/// the future.
- std::unique_ptr<ObjectBufferStream> emitObject(Module *M);
+ std::unique_ptr<MemoryBuffer> emitObject(Module *M);
- void NotifyObjectEmitted(const ObjectImage& Obj);
- void NotifyFreeingObject(const ObjectImage& Obj);
+ void NotifyObjectEmitted(const object::ObjectFile& Obj,
+ const RuntimeDyld::LoadedObjectInfo &L);
+ void NotifyFreeingObject(const object::ObjectFile& Obj);
uint64_t getExistingSymbolAddress(const std::string &Name);
Module *findModuleForSymbol(const std::string &Name,