Fix Kaleidoscope tuto: ExecutionEngine->getDataLayout() returns a ref
authorMehdi Amini <mehdi.amini@apple.com>
Thu, 16 Jul 2015 16:47:18 +0000 (16:47 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Thu, 16 Jul 2015 16:47:18 +0000 (16:47 +0000)
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242416 91177308-0d34-0410-b5e6-96231b3b80d8

examples/Kaleidoscope/Chapter4/toy.cpp
examples/Kaleidoscope/Chapter5/toy.cpp
examples/Kaleidoscope/Chapter6/toy.cpp
examples/Kaleidoscope/Chapter7/toy.cpp
examples/Kaleidoscope/Chapter8/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.
index db9904895739ef68129568c408f87e01115c7663..08d0b77e70893843ca13f22b2d216b929a39d7ed 100644 (file)
@@ -913,7 +913,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.
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.
index b1a41fa01b76b7c3276ea83877beb7da34a27ad7..0217fac10ec3166c28e4fb5233dd2d8e61535346 100644 (file)
@@ -1211,7 +1211,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());
   // Promote allocas to registers.
index 71bc2f6840270515f17798960246e61e56937d10..dbc996d4318267344a811f87a73b82d3cbf27a8f 100644 (file)
@@ -1462,7 +1462,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());
 #if 0
   // Provide basic AliasAnalysis support for GVN.
   OurFPM.add(createBasicAliasAnalysisPass());