Add a convenience method for creating EE's.
llvm-svn: 43206
This commit is contained in:
parent
8ee70112ea
commit
b5163bb9f0
|
@ -108,11 +108,17 @@ public:
|
||||||
Function *FindFunctionNamed(const char *FnName);
|
Function *FindFunctionNamed(const char *FnName);
|
||||||
|
|
||||||
/// create - This is the factory method for creating an execution engine which
|
/// create - This is the factory method for creating an execution engine which
|
||||||
/// is appropriate for the current machine.
|
/// is appropriate for the current machine. This takes ownership of the
|
||||||
|
/// module provider.
|
||||||
static ExecutionEngine *create(ModuleProvider *MP,
|
static ExecutionEngine *create(ModuleProvider *MP,
|
||||||
bool ForceInterpreter = false,
|
bool ForceInterpreter = false,
|
||||||
std::string *ErrorStr = 0);
|
std::string *ErrorStr = 0);
|
||||||
|
|
||||||
|
/// create - This is the factory method for creating an execution engine which
|
||||||
|
/// is appropriate for the current machine. This takes ownership of the
|
||||||
|
/// module.
|
||||||
|
static ExecutionEngine *create(Module *M);
|
||||||
|
|
||||||
/// runFunction - Execute the specified function with the specified arguments,
|
/// runFunction - Execute the specified function with the specified arguments,
|
||||||
/// and return the result.
|
/// and return the result.
|
||||||
///
|
///
|
||||||
|
|
|
@ -328,6 +328,10 @@ ExecutionEngine *ExecutionEngine::create(ModuleProvider *MP,
|
||||||
return EE;
|
return EE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ExecutionEngine *ExecutionEngine::create(Module *M) {
|
||||||
|
return create(new ExistingModuleProvider(M));
|
||||||
|
}
|
||||||
|
|
||||||
/// getPointerToGlobal - This returns the address of the specified global
|
/// getPointerToGlobal - This returns the address of the specified global
|
||||||
/// value. This may involve code generation if it's a function.
|
/// value. This may involve code generation if it's a function.
|
||||||
///
|
///
|
||||||
|
|
Loading…
Reference in New Issue