diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-02-05 20:47:22 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-02-05 20:47:22 +0000 |
commit | ef9b9a793949469cdaa4ab6d0173136229dcab7b (patch) | |
tree | 137b30d24ba219e5e745a11abb3807a9c4964aaa /tools/bugpoint/ExtractFunction.cpp | |
parent | 15468bfc22302b4f79300252425d74cd6865f8b1 (diff) |
For PR411:
This patch replaces the SymbolTable class with ValueSymbolTable which does
not support types planes. This means that all symbol names in LLVM must now
be unique. The patch addresses the necessary changes to deal with this and
removes code no longer needed as a result. This completes the bulk of the
changes for this PR. Some cleanup patches will follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33918 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint/ExtractFunction.cpp')
-rw-r--r-- | tools/bugpoint/ExtractFunction.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/bugpoint/ExtractFunction.cpp b/tools/bugpoint/ExtractFunction.cpp index b9d43e8971..1ff06f88b1 100644 --- a/tools/bugpoint/ExtractFunction.cpp +++ b/tools/bugpoint/ExtractFunction.cpp @@ -110,7 +110,6 @@ Module *BugDriver::performFinalCleanups(Module *M, bool MayModifySemantics) { I->setLinkage(GlobalValue::ExternalLinkage); std::vector<const PassInfo*> CleanupPasses; - CleanupPasses.push_back(getPI(createFunctionResolvingPass())); CleanupPasses.push_back(getPI(createGlobalDCEPass())); CleanupPasses.push_back(getPI(createDeadTypeEliminationPass())); @@ -221,7 +220,7 @@ static void SplitStaticCtorDtor(const char *GlobalName, Module *M1, Module *M2){ M1Tors.push_back(std::make_pair(F, Priority)); else { // Map to M2's version of the function. - F = M2->getFunction(F->getName(), F->getFunctionType()); + F = M2->getFunction(F->getName()); M2Tors.push_back(std::make_pair(F, Priority)); } } @@ -272,9 +271,10 @@ Module *llvm::SplitFunctionsOutOfModule(Module *M, std::set<std::pair<std::string, const PointerType*> > TestFunctions; for (unsigned i = 0, e = F.size(); i != e; ++i) { TestFunctions.insert(std::make_pair(F[i]->getName(), F[i]->getType())); - Function *TNOF = M->getFunction(F[i]->getName(), F[i]->getFunctionType()); - DEBUG(std::cerr << "Removing function " << F[i]->getName() << "\n"); + Function *TNOF = M->getFunction(F[i]->getName()); assert(TNOF && "Function doesn't exist in module!"); + assert(TNOF->getFunctionType() == F[i]->getFunctionType() && "wrong type?"); + DEBUG(std::cerr << "Removing function " << F[i]->getName() << "\n"); DeleteFunctionBody(TNOF); // Function is now external in this module! } @@ -317,7 +317,7 @@ bool BlockExtractorPass::runOnModule(Module &M) { Function *F = BB->getParent(); // Map the corresponding function in this module. - Function *MF = M.getFunction(F->getName(), F->getFunctionType()); + Function *MF = M.getFunction(F->getName()); // Figure out which index the basic block is in its function. Function::iterator BBI = MF->begin(); |