From b4bc424c9acd787fbfcd1506aadd6e49113f6b1c Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Fri, 24 Jul 2015 01:44:39 +0000 Subject: Remove access to the DataLayout in the TargetMachine Summary: Replace getDataLayout() with a createDataLayout() method to make explicit that it is intended to create a DataLayout only and not accessing it for other purpose. This change is the last of a series of commits dedicated to have a single DataLayout during compilation by using always the one owned by the module. Reviewers: echristo Subscribers: jholewinski, llvm-commits, rafael, yaron.keren Differential Revision: http://reviews.llvm.org/D11103 (cherry picked from commit 5609fc56bca971e5a7efeaa6ca4676638eaec5ea) From: Mehdi Amini llvm-svn: 243083 --- llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/ExecutionEngine/MCJIT') diff --git a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp index 5f4641515ce..492478da89f 100644 --- a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp +++ b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp @@ -68,7 +68,7 @@ MCJIT::createJIT(std::unique_ptr M, MCJIT::MCJIT(std::unique_ptr M, std::unique_ptr TM, std::shared_ptr MemMgr, std::shared_ptr 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) { -- cgit v1.2.3