summaryrefslogtreecommitdiffstats
path: root/examples/Kaleidoscope/Chapter4/toy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/Kaleidoscope/Chapter4/toy.cpp')
-rw-r--r--examples/Kaleidoscope/Chapter4/toy.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/Kaleidoscope/Chapter4/toy.cpp b/examples/Kaleidoscope/Chapter4/toy.cpp
index 70fe57f..329c3be 100644
--- a/examples/Kaleidoscope/Chapter4/toy.cpp
+++ b/examples/Kaleidoscope/Chapter4/toy.cpp
@@ -560,8 +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());
- FPM->add(new DataLayoutPass());
+ OpenModule->setDataLayout(*NewEngine->getDataLayout());
// Provide basic AliasAnalysis support for GVN.
FPM->add(createBasicAliasAnalysisPass());
// Promote allocas to registers.