summaryrefslogtreecommitdiff
path: root/tools/lto
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-05-22 00:20:07 +0000
committerChris Lattner <sabre@nondot.org>2011-05-22 00:20:07 +0000
commit817a01ffb24504f5b00fdac9d79aa034c918f28b (patch)
tree338c8255d5626d59b14eed9e0c384053cd31305a /tools/lto
parent92a9cb6594e22e2e273f61922226616bf0b943df (diff)
downloadllvm-817a01ffb24504f5b00fdac9d79aa034c918f28b.tar.gz
llvm-817a01ffb24504f5b00fdac9d79aa034c918f28b.tar.bz2
llvm-817a01ffb24504f5b00fdac9d79aa034c918f28b.tar.xz
switch bugpoint and liblto to PassManagerBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131821 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lto')
-rw-r--r--tools/lto/LTOCodeGenerator.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp
index d95f35405b..3abd641365 100644
--- a/tools/lto/LTOCodeGenerator.cpp
+++ b/tools/lto/LTOCodeGenerator.cpp
@@ -14,7 +14,6 @@
#include "LTOModule.h"
#include "LTOCodeGenerator.h"
-
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Linker.h"
@@ -37,7 +36,7 @@
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FormattedStream.h"
#include "llvm/Support/MemoryBuffer.h"
-#include "llvm/Support/StandardPasses.h"
+#include "llvm/Support/PassManagerBuilder.h"
#include "llvm/Support/SystemUtils.h"
#include "llvm/Support/ToolOutputFile.h"
#include "llvm/Support/Host.h"
@@ -355,9 +354,8 @@ void LTOCodeGenerator::applyScopeRestrictions() {
}
/// Optimize merged modules using various IPO passes
-bool LTOCodeGenerator::generateObjectFile(raw_ostream& out,
- std::string& errMsg)
-{
+bool LTOCodeGenerator::generateObjectFile(raw_ostream &out,
+ std::string &errMsg) {
if ( this->determineTarget(errMsg) )
return true;
@@ -380,13 +378,13 @@ bool LTOCodeGenerator::generateObjectFile(raw_ostream& out,
// Add an appropriate TargetData instance for this module...
passes.add(new TargetData(*_target->getTargetData()));
- createStandardLTOPasses(&passes, /*Internalize=*/ false, !DisableInline,
- /*VerifyEach=*/ false);
+ PassManagerBuilder().populateLTOPassManager(passes, /*Internalize=*/ false,
+ !DisableInline);
// Make sure everything is still good.
passes.add(createVerifierPass());
- FunctionPassManager* codeGenPasses = new FunctionPassManager(mergedModule);
+ FunctionPassManager *codeGenPasses = new FunctionPassManager(mergedModule);
codeGenPasses->add(new TargetData(*_target->getTargetData()));