Make DataLayout Non-Optional in the Module
[oota-llvm.git] / examples / Kaleidoscope / Orc / lazy_codegen / toy.cpp
index 1ed267d5d68f7aa5ed1be79e999b98d6af0a473e..6e2ec2723a432461457a68b4aef33ed12b80b952 100644 (file)
@@ -715,7 +715,7 @@ public:
       M(new Module(GenerateUniqueName("jit_module_"),
                    Session.getLLVMContext())),
       Builder(Session.getLLVMContext()) {
-    M->setDataLayout(Session.getTarget().getDataLayout());
+    M->setDataLayout(*Session.getTarget().getDataLayout());
   }
 
   SessionContext& getSession() { return Session; }