[llvm] r242416 - Fix Kaleidoscope tuto: ExecutionEngine->getDataLayout() returns a ref

Mehdi Amini mehdi.amini at apple.com
Thu Jul 16 09:47:18 PDT 2015


Author: mehdi_amini
Date: Thu Jul 16 11:47:18 2015
New Revision: 242416

URL: http://llvm.org/viewvc/llvm-project?rev=242416&view=rev
Log:
Fix Kaleidoscope tuto: ExecutionEngine->getDataLayout() returns a ref

From: Mehdi Amini <mehdi.amini at apple.com>

Modified:
    llvm/trunk/examples/Kaleidoscope/Chapter4/toy.cpp
    llvm/trunk/examples/Kaleidoscope/Chapter5/toy.cpp
    llvm/trunk/examples/Kaleidoscope/Chapter6/toy.cpp
    llvm/trunk/examples/Kaleidoscope/Chapter7/toy.cpp
    llvm/trunk/examples/Kaleidoscope/Chapter8/toy.cpp

Modified: llvm/trunk/examples/Kaleidoscope/Chapter4/toy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter4/toy.cpp?rev=242416&r1=242415&r2=242416&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Chapter4/toy.cpp (original)
+++ llvm/trunk/examples/Kaleidoscope/Chapter4/toy.cpp Thu Jul 16 11:47:18 2015
@@ -560,7 +560,7 @@ void *MCJITHelper::getPointerToFunction(
 
     // 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.

Modified: llvm/trunk/examples/Kaleidoscope/Chapter5/toy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter5/toy.cpp?rev=242416&r1=242415&r2=242416&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Chapter5/toy.cpp (original)
+++ llvm/trunk/examples/Kaleidoscope/Chapter5/toy.cpp Thu Jul 16 11:47:18 2015
@@ -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.

Modified: llvm/trunk/examples/Kaleidoscope/Chapter6/toy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter6/toy.cpp?rev=242416&r1=242415&r2=242416&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Chapter6/toy.cpp (original)
+++ llvm/trunk/examples/Kaleidoscope/Chapter6/toy.cpp Thu Jul 16 11:47:18 2015
@@ -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.

Modified: llvm/trunk/examples/Kaleidoscope/Chapter7/toy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter7/toy.cpp?rev=242416&r1=242415&r2=242416&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Chapter7/toy.cpp (original)
+++ llvm/trunk/examples/Kaleidoscope/Chapter7/toy.cpp Thu Jul 16 11:47:18 2015
@@ -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.

Modified: llvm/trunk/examples/Kaleidoscope/Chapter8/toy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter8/toy.cpp?rev=242416&r1=242415&r2=242416&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Chapter8/toy.cpp (original)
+++ llvm/trunk/examples/Kaleidoscope/Chapter8/toy.cpp Thu Jul 16 11:47:18 2015
@@ -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());





More information about the llvm-commits mailing list