From cd253dae12b64316c72a14d702f8e0f2fdafd82b Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Thu, 16 Jul 2015 16:47:18 +0000 Subject: [PATCH] Fix Kaleidoscope tuto: ExecutionEngine->getDataLayout() returns a ref From: Mehdi Amini llvm-svn: 242416 --- llvm/examples/Kaleidoscope/Chapter4/toy.cpp | 2 +- llvm/examples/Kaleidoscope/Chapter5/toy.cpp | 2 +- llvm/examples/Kaleidoscope/Chapter6/toy.cpp | 2 +- llvm/examples/Kaleidoscope/Chapter7/toy.cpp | 2 +- llvm/examples/Kaleidoscope/Chapter8/toy.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/llvm/examples/Kaleidoscope/Chapter4/toy.cpp b/llvm/examples/Kaleidoscope/Chapter4/toy.cpp index ad091e4..db59e26 100644 --- a/llvm/examples/Kaleidoscope/Chapter4/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter4/toy.cpp @@ -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. diff --git a/llvm/examples/Kaleidoscope/Chapter5/toy.cpp b/llvm/examples/Kaleidoscope/Chapter5/toy.cpp index db99048..08d0b77 100644 --- a/llvm/examples/Kaleidoscope/Chapter5/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter5/toy.cpp @@ -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. diff --git a/llvm/examples/Kaleidoscope/Chapter6/toy.cpp b/llvm/examples/Kaleidoscope/Chapter6/toy.cpp index e978a3e..109c43b 100644 --- a/llvm/examples/Kaleidoscope/Chapter6/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter6/toy.cpp @@ -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. diff --git a/llvm/examples/Kaleidoscope/Chapter7/toy.cpp b/llvm/examples/Kaleidoscope/Chapter7/toy.cpp index b1a41fa..0217fac 100644 --- a/llvm/examples/Kaleidoscope/Chapter7/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter7/toy.cpp @@ -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. diff --git a/llvm/examples/Kaleidoscope/Chapter8/toy.cpp b/llvm/examples/Kaleidoscope/Chapter8/toy.cpp index 71bc2f6..dbc996d 100644 --- a/llvm/examples/Kaleidoscope/Chapter8/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter8/toy.cpp @@ -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()); -- 2.7.4