add a new ExecutionEngine::createJIT which can be used if you only want
to create a JIT. This lets you specify JIT-specific configuration items
like the JITMemoryManager to use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44647 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/ExecutionEngine/JIT/JIT.h b/lib/ExecutionEngine/JIT/JIT.h
index 6453740..789bbbb 100644
--- a/lib/ExecutionEngine/JIT/JIT.h
+++ b/lib/ExecutionEngine/JIT/JIT.h
@@ -56,7 +56,8 @@
JITState jitstate;
- JIT(ModuleProvider *MP, TargetMachine &tm, TargetJITInfo &tji);
+ JIT(ModuleProvider *MP, TargetMachine &tm, TargetJITInfo &tji,
+ JITMemoryManager *JMM);
public:
~JIT();
@@ -71,7 +72,9 @@
/// create - Create an return a new JIT compiler if there is one available
/// for the current target. Otherwise, return null.
///
- static ExecutionEngine *create(ModuleProvider *MP, std::string* = 0);
+ static ExecutionEngine *create(ModuleProvider *MP, std::string *Err) {
+ return createJIT(MP, Err, 0);
+ }
/// run - Start execution with the specified function and arguments.
///
@@ -120,6 +123,10 @@
/// getCodeEmitter - Return the code emitter this JIT is emitting into.
MachineCodeEmitter *getCodeEmitter() const { return MCE; }
+
+ static ExecutionEngine *createJIT(ModuleProvider *MP, std::string *Err,
+ JITMemoryManager *JMM);
+
private:
static MachineCodeEmitter *createEmitter(JIT &J, JITMemoryManager *JMM);
void runJITOnFunction (Function *F);