Fix the build of the gold-plugin and examples.
[oota-llvm.git] / examples / Kaleidoscope / Chapter8 / toy.cpp
index 1b6e5ed6b9832d074b38f0a0a74a0b098de20e3c..39b6a6541504a1fbf56dc1095e4e88997297596f 100644 (file)
@@ -1459,8 +1459,7 @@ int main() {
 
   // Set up the optimizer pipeline.  Start with registering info about how the
   // target lays out data structures.
-  TheModule->setDataLayout(TheExecutionEngine->getDataLayout());
-  OurFPM.add(new DataLayoutPass());
+  TheModule->setDataLayout(*TheExecutionEngine->getDataLayout());
 #if 0
   // Provide basic AliasAnalysis support for GVN.
   OurFPM.add(createBasicAliasAnalysisPass());