From 5d8e569926773bea0e55d00a644c17ca202c29cc Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Fri, 24 Jul 2015 03:36:55 +0000 Subject: 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 llvm-svn: 243089 --- llvm/examples/Kaleidoscope/Orc/initial/toy.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/examples/Kaleidoscope/Orc/initial/toy.cpp') 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; }; -- cgit v1.2.3