diff options
| author | Mehdi Amini <mehdi.amini@apple.com> | 2015-07-24 03:36:55 +0000 |
|---|---|---|
| committer | Mehdi Amini <mehdi.amini@apple.com> | 2015-07-24 03:36:55 +0000 |
| commit | 5d8e569926773bea0e55d00a644c17ca202c29cc (patch) | |
| tree | f5420b8d7b9e448aaebc025923f2c13608ef6bae /llvm/examples | |
| parent | 5311a0b3636a75a2210547d0bc2f8e6366143b9c (diff) | |
| download | bcm5719-llvm-5d8e569926773bea0e55d00a644c17ca202c29cc.tar.gz bcm5719-llvm-5d8e569926773bea0e55d00a644c17ca202c29cc.zip | |
Revert "Remove access to the DataLayout in the TargetMachine"
This reverts commit 0f720d984f419c747709462f7476dff962c0bc41.
It breaks clang too badly, I need to prepare a proper patch for clang
first.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 243089
Diffstat (limited to 'llvm/examples')
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; } |

