Fix for PR960. Improves bugpoint so that it removes global variable
[oota-llvm.git] / tools / bugpoint / BugDriver.cpp
index e499477630d53d5808ae78d41da70ebacd36e424..236e8a3cac193ea7ca5210701e95ea1be4cdcb69 100644 (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;
+}