summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint/ExtractFunction.cpp
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
commitaf67dac7f44ecdc9fa56addd9b25893b0dbf2f00 (patch)
tree07846798e2b6946cdf34e84ce2c29850b0ab5ef4 /llvm/tools/bugpoint/ExtractFunction.cpp
parent73c141ac712f90130974e45b0fc3575c40ce88bb (diff)
downloadbcm5719-llvm-af67dac7f44ecdc9fa56addd9b25893b0dbf2f00.tar.gz
bcm5719-llvm-af67dac7f44ecdc9fa56addd9b25893b0dbf2f00.zip
Fix a fairly nasty bug that prevented bugpoint from working quite right when
hacking on programs with two functions that have the same name. llvm-svn: 12604
Diffstat (limited to 'llvm/tools/bugpoint/ExtractFunction.cpp')
-rw-r--r--llvm/tools/bugpoint/ExtractFunction.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/tools/bugpoint/ExtractFunction.cpp b/llvm/tools/bugpoint/ExtractFunction.cpp
index 5119c801a02..eea7bd8e253 100644
--- a/llvm/tools/bugpoint/ExtractFunction.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud