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

Chris Lattner lattner at cs.uiuc.edu
Sun Oct 19 18:34:18 PDT 2003


Changes in directory llvm/tools/bugpoint:

CodeGeneratorBug.cpp updated: 1.25 -> 1.26

---
Log message:

Don't bother forwarding function references which are external to the program entirely


---
Diffs of the changes:  (+4 -2)

Index: llvm/tools/bugpoint/CodeGeneratorBug.cpp
diff -u llvm/tools/bugpoint/CodeGeneratorBug.cpp:1.25 llvm/tools/bugpoint/CodeGeneratorBug.cpp:1.26
--- llvm/tools/bugpoint/CodeGeneratorBug.cpp:1.25	Sun Oct 19 16:48:27 2003
+++ llvm/tools/bugpoint/CodeGeneratorBug.cpp	Sun Oct 19 18:32:50 2003
@@ -112,8 +112,10 @@
     // Use the function we just added to get addresses of functions we need
     // Iterate over the global declarations in the Safe module
     for (Module::iterator F=SafeModule->begin(),E=SafeModule->end(); F!=E; ++F){
-      if (F->isExternal() && !F->use_empty() && &(*F) != resolverFunc &&
-          F->getIntrinsicID() == 0 /* ignore intrinsics */) {
+      if (F->isExternal() && !F->use_empty() && &*F != resolverFunc &&
+          F->getIntrinsicID() == 0 /* ignore intrinsics */ &&
+          // Don't forward functions which are external in the test module too.
+          !TestModule->getNamedFunction(F->getName())->isExternal()) {
         // If it has a non-zero use list,
         // 1. Add a string constant with its name to the global file
         // The correct type is `const [ NUM x sbyte ]' where NUM is length of





More information about the llvm-commits mailing list