[llvm-commits] CVS: llvm/tools/bugpoint/ExtractFunction.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Apr 2 00:34:01 PST 2004


Changes in directory llvm/tools/bugpoint:

ExtractFunction.cpp updated: 1.31 -> 1.32

---
Log message:

Fix a fairly nasty bug that prevented bugpoint from working quite right when
hacking on programs with two functions that have the same name.


---
Diffs of the changes:  (+3 -1)

Index: llvm/tools/bugpoint/ExtractFunction.cpp
diff -u llvm/tools/bugpoint/ExtractFunction.cpp:1.31 llvm/tools/bugpoint/ExtractFunction.cpp:1.32
--- llvm/tools/bugpoint/ExtractFunction.cpp:1.31	Wed Mar 17 11:37:18 2004
+++ llvm/tools/bugpoint/ExtractFunction.cpp	Fri Apr  2 00:30:33 2004
@@ -195,7 +195,9 @@
     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);





More information about the llvm-commits mailing list