summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/tools/gold/gold-plugin.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp
index 68c9d1a6f6e..18cd621317e 100644
--- a/llvm/tools/gold/gold-plugin.cpp
+++ b/llvm/tools/gold/gold-plugin.cpp
@@ -716,8 +716,7 @@ getModuleForFile(LLVMContext &Context, claimed_file &F,
}
static void runLTOPasses(Module &M, TargetMachine &TM) {
- if (const DataLayout *DL = TM.getDataLayout())
- M.setDataLayout(*DL);
+ M.setDataLayout(TM.createDataLayout());
legacy::PassManager passes;
passes.add(createTargetTransformInfoWrapperPass(TM.getTargetIRAnalysis()));
OpenPOWER on IntegriCloud