From: Chandler Carruth Date: Fri, 24 Jul 2015 17:23:09 +0000 (+0000) Subject: Update for r243115 which changed the DataLayout API on TargetMachine but X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5da92333c3c4fe7060bcfa4c692b54c2296dc209;p=oota-llvm.git Update for r243115 which changed the DataLayout API on TargetMachine but didn't update the gold-plugin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243121 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/gold/gold-plugin.cpp b/tools/gold/gold-plugin.cpp index 68c9d1a6f6e..18cd621317e 100644 --- a/tools/gold/gold-plugin.cpp +++ b/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()));