summaryrefslogtreecommitdiffstats
path: root/llvm/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2015-07-24 01:44:39 +0000
committerMehdi Amini <mehdi.amini@apple.com>2015-07-24 01:44:39 +0000
commitb4bc424c9acd787fbfcd1506aadd6e49113f6b1c (patch)
tree9c2ce064903e369eb131334f15d93d259e2a7bbd /llvm/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp
parentf95da49f25fcccc9a3dd515d0ef0d6493e5f5e2a (diff)
downloadbcm5719-llvm-b4bc424c9acd787fbfcd1506aadd6e49113f6b1c.tar.gz
bcm5719-llvm-b4bc424c9acd787fbfcd1506aadd6e49113f6b1c.zip
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 <mehdi.amini@apple.com> llvm-svn: 243083
Diffstat (limited to 'llvm/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp')
-rw-r--r--llvm/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp b/llvm/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp
index ca34de7e224..7373c99d543 100644
--- a/llvm/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp
+++ b/llvm/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp
@@ -716,7 +716,7 @@ public:
M(new Module(GenerateUniqueName("jit_module_"),
Session.getLLVMContext())),
Builder(Session.getLLVMContext()) {
- M->setDataLayout(*Session.getTarget().getDataLayout());
+ M->setDataLayout(Session.getTarget().createDataLayout());
}
SessionContext& getSession() { return Session; }
@@ -1170,7 +1170,7 @@ public:
{
raw_string_ostream MangledNameStream(MangledName);
Mangler::getNameWithPrefix(MangledNameStream, Name,
- *Session.getTarget().getDataLayout());
+ Session.getTarget().createDataLayout());
}
return MangledName;
}
OpenPOWER on IntegriCloud