From 4e3be89cb5cde6e2df294c64db3bc28133b67594 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 25 Oct 2006 18:36:14 +0000 Subject: 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 --- tools/bugpoint/BugDriver.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tools/bugpoint/BugDriver.cpp') 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 &Funcs) { std::cout << "... <" << Funcs.size() << " total>"; std::cout << std::flush; } + +void llvm::PrintGlobalVariableList(const std::vector &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; +} -- cgit v1.2.3-70-g09d2