summaryrefslogtreecommitdiffstats
path: root/llvm/examples/Kaleidoscope/Orc
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/examples/Kaleidoscope/Orc')
-rw-r--r--llvm/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp4
-rw-r--r--llvm/examples/Kaleidoscope/Orc/initial/toy.cpp6
-rw-r--r--llvm/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp6
-rw-r--r--llvm/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp4
4 files changed, 10 insertions, 10 deletions
diff --git a/llvm/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp b/llvm/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp
index b68f807e3e7..c9b2c6af565 100644
--- a/llvm/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp
+++ b/llvm/examples/Kaleidoscope/Orc/fully_lazy/toy.cpp
@@ -717,7 +717,7 @@ public:
M(new Module(GenerateUniqueName("jit_module_"),
Session.getLLVMContext())),
Builder(Session.getLLVMContext()) {
- M->setDataLayout(Session.getTarget().createDataLayout());
+ M->setDataLayout(*Session.getTarget().getDataLayout());
}
SessionContext& getSession() { return Session; }
@@ -1179,7 +1179,7 @@ public:
{
raw_string_ostream MangledNameStream(MangledName);
Mangler::getNameWithPrefix(MangledNameStream, Name,
- Session.getTarget().createDataLayout());
+ *Session.getTarget().getDataLayout());
}
return MangledName;
}
diff --git a/llvm/examples/Kaleidoscope/Orc/initial/toy.cpp b/llvm/examples/Kaleidoscope/Orc/initial/toy.cpp
index 91290157ace..7e99c0f5ba5 100644
--- a/llvm/examples/Kaleidoscope/Orc/initial/toy.cpp
+++ b/llvm/examples/Kaleidoscope/Orc/initial/toy.cpp
@@ -716,7 +716,7 @@ public:
M(new Module(GenerateUniqueName("jit_module_"),
Session.getLLVMContext())),
Builder(Session.getLLVMContext()) {
- M->setDataLayout(Session.getTarget().createDataLayout());
+ M->setDataLayout(*Session.getTarget().getDataLayout());
}
SessionContext& getSession() { return Session; }
@@ -1160,7 +1160,7 @@ public:
typedef CompileLayerT::ModuleSetHandleT ModuleHandleT;
KaleidoscopeJIT(SessionContext &Session)
- : DL(Session.getTarget().createDataLayout()),
+ : DL(*Session.getTarget().getDataLayout()),
CompileLayer(ObjectLayer, SimpleCompiler(Session.getTarget())) {}
std::string mangle(const std::string &Name) {
@@ -1201,7 +1201,7 @@ public:
}
private:
- const DataLayout DL;
+ const DataLayout &DL;
ObjLayerT ObjectLayer;
CompileLayerT CompileLayer;
};
diff --git a/llvm/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp b/llvm/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp
index 17f9dbb6dfa..4b4c191171b 100644
--- a/llvm/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp
+++ b/llvm/examples/Kaleidoscope/Orc/lazy_codegen/toy.cpp
@@ -716,7 +716,7 @@ public:
M(new Module(GenerateUniqueName("jit_module_"),
Session.getLLVMContext())),
Builder(Session.getLLVMContext()) {
- M->setDataLayout(Session.getTarget().createDataLayout());
+ M->setDataLayout(*Session.getTarget().getDataLayout());
}
SessionContext& getSession() { return Session; }
@@ -1162,7 +1162,7 @@ public:
typedef LazyEmitLayerT::ModuleSetHandleT ModuleHandleT;
KaleidoscopeJIT(SessionContext &Session)
- : DL(Session.getTarget().createDataLayout()),
+ : DL(*Session.getTarget().getDataLayout()),
CompileLayer(ObjectLayer, SimpleCompiler(Session.getTarget())),
LazyEmitLayer(CompileLayer) {}
@@ -1204,7 +1204,7 @@ public:
}
private:
- const DataLayout DL;
+ const DataLayout &DL;
ObjLayerT ObjectLayer;
CompileLayerT CompileLayer;
LazyEmitLayerT LazyEmitLayer;
diff --git a/llvm/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp b/llvm/examples/Kaleidoscope/Orc/lazy_irgen/toy.cpp
index 7373c99d543..ca34de7e224 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().createDataLayout());
+ M->setDataLayout(*Session.getTarget().getDataLayout());
}
SessionContext& getSession() { return Session; }
@@ -1170,7 +1170,7 @@ public:
{
raw_string_ostream MangledNameStream(MangledName);
Mangler::getNameWithPrefix(MangledNameStream, Name,
- Session.getTarget().createDataLayout());
+ *Session.getTarget().getDataLayout());
}
return MangledName;
}
OpenPOWER on IntegriCloud