unique_ptrify passing the TargetMachine to ExecutionEngine::MCJITCtor

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216988 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2014-09-02 22:41:07 +00:00
parent 41b6e327f7
commit 4becee113c
4 changed files with 16 additions and 21 deletions

View File

@ -49,10 +49,8 @@ void ObjectBuffer::anchor() {}
void ObjectBufferStream::anchor() {}
ExecutionEngine *(*ExecutionEngine::MCJITCtor)(
std::unique_ptr<Module >M,
std::string *ErrorStr,
RTDyldMemoryManager *MCJMM,
TargetMachine *TM) = nullptr;
std::unique_ptr<Module> M, std::string *ErrorStr,
RTDyldMemoryManager *MCJMM, std::unique_ptr<TargetMachine> TM) = nullptr;
ExecutionEngine *(*ExecutionEngine::InterpCtor)(std::unique_ptr<Module> M,
std::string *ErrorStr) =nullptr;
@ -453,7 +451,7 @@ ExecutionEngine *EngineBuilder::create(TargetMachine *TM) {
ExecutionEngine *EE = nullptr;
if (ExecutionEngine::MCJITCtor)
EE = ExecutionEngine::MCJITCtor(std::move(M), ErrorStr,
MCJMM ? MCJMM : JMM, TheTM.release());
MCJMM ? MCJMM : JMM, std::move(TheTM));
if (EE) {
EE->setVerifyModules(VerifyModules);
return EE;