Fix Kaleidoscope tuto: ExecutionEngine->getDataLayout() returns a ref
[oota-llvm.git] / examples / Kaleidoscope / Chapter6 / toy.cpp
index e978a3ea3682191b69a4934aac969793b9d4140b..109c43b93824786af270c57f7876bd034a9ee04b 100644 (file)
@@ -1034,7 +1034,7 @@ int main() {
 
   // Set up the optimizer pipeline.  Start with registering info about how the
   // target lays out data structures.
-  TheModule->setDataLayout(*TheExecutionEngine->getDataLayout());
+  TheModule->setDataLayout(TheExecutionEngine->getDataLayout());
   // Provide basic AliasAnalysis support for GVN.
   OurFPM.add(createBasicAliasAnalysisPass());
   // Do simple "peephole" optimizations and bit-twiddling optzns.