Remove access to the DataLayout in the TargetMachine
[oota-llvm.git] / lib / ExecutionEngine / MCJIT / MCJIT.cpp
index 5f4641515ce5641eec064edd86f5b62b971108e9..492478da89f246cf7dd6ee944d8b074d3b98156e 100644 (file)
@@ -68,7 +68,7 @@ MCJIT::createJIT(std::unique_ptr<Module> M,
 MCJIT::MCJIT(std::unique_ptr<Module> M, std::unique_ptr<TargetMachine> TM,
              std::shared_ptr<MCJITMemoryManager> MemMgr,
              std::shared_ptr<RuntimeDyld::SymbolResolver> Resolver)
-    : ExecutionEngine(*TM->getDataLayout(), std::move(M)), TM(std::move(TM)),
+    : ExecutionEngine(TM->createDataLayout(), std::move(M)), TM(std::move(TM)),
       Ctx(nullptr), MemMgr(std::move(MemMgr)),
       Resolver(*this, std::move(Resolver)), Dyld(*this->MemMgr, this->Resolver),
       ObjCache(nullptr) {