Most of bugpoint now only needs to know the pass names.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110534 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/bugpoint/bugpoint.cpp b/tools/bugpoint/bugpoint.cpp
index 17f3fc7..025beec 100644
--- a/tools/bugpoint/bugpoint.cpp
+++ b/tools/bugpoint/bugpoint.cpp
@@ -85,7 +85,7 @@
     virtual void add(Pass *P) {
       const void *ID = P->getPassID();
       const PassInfo *PI = PassRegistry::getPassRegistry()->getPassInfo(ID);
-      D.addPasses(&PI, &PI + 1);
+      D.addPass(PI->getPassArgument());
     }
   };
 }
@@ -137,7 +137,13 @@
                             /*RunInliner=*/true,
                             /*VerifyEach=*/false);
 
-  D.addPasses(PassList.begin(), PassList.end());
+
+  for (std::vector<const PassInfo*>::iterator I = PassList.begin(),
+         E = PassList.end();
+       I != E; ++I) {
+    const PassInfo* PI = *I;
+    D.addPass(PI->getPassArgument());
+  }
 
   // Bugpoint has the ability of generating a plethora of core files, so to
   // avoid filling up the disk, we prevent it