Remove access to the DataLayout in the TargetMachine
[oota-llvm.git] / lib / LTO / LTOCodeGenerator.cpp
index 149ec6a4f372549aacb65c4ea6ee6ae40c53c5ef..daaf22329223c32907b4b5f3472b5c1b154f31b3 100644 (file)
@@ -521,7 +521,7 @@ bool LTOCodeGenerator::optimize(bool DisableInline,
   legacy::PassManager passes;
 
   // Add an appropriate DataLayout instance for this module...
-  mergedModule->setDataLayout(*TargetMach->getDataLayout());
+  mergedModule->setDataLayout(TargetMach->createDataLayout());
 
   passes.add(
       createTargetTransformInfoWrapperPass(TargetMach->getTargetIRAnalysis()));