Fix Kaleidoscope tuto: ExecutionEngine->getDataLayout() returns a ref
[oota-llvm.git] / examples / Kaleidoscope / Chapter4 / toy.cpp
index ad091e4496b73775aa6412ef961b122e448cfd72..db59e265d2e8ae675e715c56a78c6d65e553e5a6 100644 (file)
@@ -560,7 +560,7 @@ void *MCJITHelper::getPointerToFunction(Function *F) {
 
     // Set up the optimizer pipeline.  Start with registering info about how the
     // target lays out data structures.
-    OpenModule->setDataLayout(*NewEngine->getDataLayout());
+    OpenModule->setDataLayout(NewEngine->getDataLayout());
     // Provide basic AliasAnalysis support for GVN.
     FPM->add(createBasicAliasAnalysisPass());
     // Promote allocas to registers.