aboutsummaryrefslogtreecommitdiff
path: root/tools/bugpoint/ExtractFunction.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-07-20 03:06:07 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-07-20 03:06:07 +0000
commite8a469cdb400249ec263c79d1021f953f42f2760 (patch)
tree7e8a5fbe32425e7360d052e45caa82e9b6191fcc /tools/bugpoint/ExtractFunction.cpp
parent8ba15cb7099d9eadcb345328228d77ffa5afa42d (diff)
Revert r108794, "Separate PassInfo into two classes: a constructor-free
superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).", it is breaking teh everything. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108805 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint/ExtractFunction.cpp')
-rw-r--r--tools/bugpoint/ExtractFunction.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/bugpoint/ExtractFunction.cpp b/tools/bugpoint/ExtractFunction.cpp
index 55c1780ff9..d5611b58ae 100644
--- a/tools/bugpoint/ExtractFunction.cpp
+++ b/tools/bugpoint/ExtractFunction.cpp
@@ -99,8 +99,8 @@ Module *BugDriver::deleteInstructionFromProgram(const Instruction *I,
return Result;
}
-static const StaticPassInfo *getPI(Pass *P) {
- const StaticPassInfo *PI = P->getPassInfo();
+static const PassInfo *getPI(Pass *P) {
+ const PassInfo *PI = P->getPassInfo();
delete P;
return PI;
}
@@ -114,7 +114,7 @@ Module *BugDriver::performFinalCleanups(Module *M, bool MayModifySemantics) {
for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I)
I->setLinkage(GlobalValue::ExternalLinkage);
- std::vector<const StaticPassInfo*> CleanupPasses;
+ std::vector<const PassInfo*> CleanupPasses;
CleanupPasses.push_back(getPI(createGlobalDCEPass()));
if (MayModifySemantics)
@@ -138,7 +138,7 @@ Module *BugDriver::performFinalCleanups(Module *M, bool MayModifySemantics) {
/// function. This returns null if there are no extractable loops in the
/// program or if the loop extractor crashes.
Module *BugDriver::ExtractLoop(Module *M) {
- std::vector<const StaticPassInfo*> LoopExtractPasses;
+ std::vector<const PassInfo*> LoopExtractPasses;
LoopExtractPasses.push_back(getPI(createSingleLoopExtractorPass()));
Module *NewM = runPassesOn(M, LoopExtractPasses);
@@ -359,7 +359,7 @@ Module *BugDriver::ExtractMappedBlocksFromModule(const
std::string uniqueFN = "--extract-blocks-file=" + uniqueFilename.str();
const char *ExtraArg = uniqueFN.c_str();
- std::vector<const StaticPassInfo*> PI;
+ std::vector<const PassInfo*> PI;
std::vector<BasicBlock *> EmptyBBs; // This parameter is ignored.
PI.push_back(getPI(createBlockExtractorPass(EmptyBBs)));
Module *Ret = runPassesOn(M, PI, false, 1, &ExtraArg);