summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-04-02 06:30:33 +0000
committerChris Lattner <sabre@nondot.org>2004-04-02 06:30:33 +0000
commit87ab7e994fb20ae5bfcb18fa7587d0fc2d55481a (patch)
tree86cd44ddcf40b94b46605be3116ed928a9997041 /tools
parent58d84ced5f7367335e43ea54e5daf32a4fdaefb6 (diff)
downloadllvm-87ab7e994fb20ae5bfcb18fa7587d0fc2d55481a.tar.gz
llvm-87ab7e994fb20ae5bfcb18fa7587d0fc2d55481a.tar.bz2
llvm-87ab7e994fb20ae5bfcb18fa7587d0fc2d55481a.tar.xz
Fix a fairly nasty bug that prevented bugpoint from working quite right when
hacking on programs with two functions that have the same name. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12604 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/bugpoint/ExtractFunction.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/bugpoint/ExtractFunction.cpp b/tools/bugpoint/ExtractFunction.cpp
index 5119c801a0..eea7bd8e25 100644
--- a/tools/bugpoint/ExtractFunction.cpp
+++ b/tools/bugpoint/ExtractFunction.cpp
@@ -195,7 +195,9 @@ Module *llvm::SplitFunctionsOutOfModule(Module *M,
bool funcFound = false;
for (std::vector<Function*>::const_iterator FI = F.begin(), Fe = F.end();
FI != Fe; ++FI)
- if (I->getName() == (*FI)->getName()) funcFound = true;
+ if (I->getName() == (*FI)->getName() &&
+ I->getType() == (*FI)->getType())
+ funcFound = true;
if (!funcFound)
DeleteFunctionBody(I);