Fix for PR960. Improves bugpoint so that it removes global variable

initializers as well. This is only a first pass. It can be slow because
it clones the module for each pass. An obvious improvement is not to do that.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31182 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling
2006-10-25 18:36:14 +00:00
parent 08fb05c3ac
commit 4e3be89cb5
3 changed files with 110 additions and 23 deletions
+10
View File
@@ -221,3 +221,13 @@ void llvm::PrintFunctionList(const std::vector<Function*> &Funcs) {
std::cout << "... <" << Funcs.size() << " total>";
std::cout << std::flush;
}
void llvm::PrintGlobalVariableList(const std::vector<GlobalVariable*> &GVs) {
unsigned NumPrint = GVs.size();
if (NumPrint > 10) NumPrint = 10;
for (unsigned i = 0; i != NumPrint; ++i)
std::cout << " " << GVs[i]->getName();
if (NumPrint < GVs.size())
std::cout << "... <" << GVs.size() << " total>";
std::cout << std::flush;
}