Make DataLayout Non-Optional in the Module
[oota-llvm.git] / examples / Kaleidoscope / Orc / lazy_irgen / toy.cpp
index 388c3f9b7bdb448e74da411787ec00815e31fcf7..19801e12030bbc4c0baffce126ab30a7649ae31b 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; }