forked from OSchip/llvm-project
gold-plugin.cpp: Fixup r227599 corresponding to r227685 and r227731 -- Don't lose DataLayoutPass.
llvm-svn: 227783
This commit is contained in:
parent
82d9e7ec1c
commit
b0a52838fa
|
@ -16,6 +16,7 @@
|
|||
#include "llvm/ADT/DenseSet.h"
|
||||
#include "llvm/ADT/StringSet.h"
|
||||
#include "llvm/Analysis/TargetLibraryInfo.h"
|
||||
#include "llvm/Analysis/TargetTransformInfo.h"
|
||||
#include "llvm/Bitcode/ReaderWriter.h"
|
||||
#include "llvm/CodeGen/Analysis.h"
|
||||
#include "llvm/CodeGen/CommandFlags.h"
|
||||
|
@ -696,8 +697,11 @@ getModuleForFile(LLVMContext &Context, claimed_file &F, raw_fd_ostream *ApiFile,
|
|||
return Obj.takeModule();
|
||||
}
|
||||
|
||||
static void runLTOPasses(Module &M, const TargetMachine &TM) {
|
||||
static void runLTOPasses(Module &M, TargetMachine &TM) {
|
||||
PassManager passes;
|
||||
passes.add(new DataLayoutPass());
|
||||
passes.add(createTargetTransformInfoWrapperPass(TM.getTargetIRAnalysis()));
|
||||
|
||||
PassManagerBuilder PMB;
|
||||
PMB.LibraryInfo = new TargetLibraryInfoImpl(Triple(TM.getTargetTriple()));
|
||||
PMB.Inliner = createFunctionInliningPass();
|
||||
|
|
Loading…
Reference in New Issue