diff options
author | Bill Wendling <isanbard@gmail.com> | 2006-10-25 18:36:14 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2006-10-25 18:36:14 +0000 |
commit | 4e3be89cb5cde6e2df294c64db3bc28133b67594 (patch) | |
tree | bac57f80bd41231b9bb2d953374106fea1e7f8b6 /tools/bugpoint/BugDriver.cpp | |
parent | 08fb05c3ac440979021f508bfee073359be46f7e (diff) | |
download | llvm-4e3be89cb5cde6e2df294c64db3bc28133b67594.tar.gz llvm-4e3be89cb5cde6e2df294c64db3bc28133b67594.tar.bz2 llvm-4e3be89cb5cde6e2df294c64db3bc28133b67594.tar.xz |
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
Diffstat (limited to 'tools/bugpoint/BugDriver.cpp')
-rw-r--r-- | tools/bugpoint/BugDriver.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/bugpoint/BugDriver.cpp b/tools/bugpoint/BugDriver.cpp index e499477630..236e8a3cac 100644 --- a/tools/bugpoint/BugDriver.cpp +++ b/tools/bugpoint/BugDriver.cpp @@ -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; +} |