Instead of abusing swapProgramIn, just add a Module argument to
EmitProgressBitcode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109602 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/bugpoint/CrashDebugger.cpp b/tools/bugpoint/CrashDebugger.cpp
index 2d0631c..272ec7e 100644
--- a/tools/bugpoint/CrashDebugger.cpp
+++ b/tools/bugpoint/CrashDebugger.cpp
@@ -471,7 +471,7 @@
             return true;
 
           if (GVs.size() < OldSize)
-            BD.EmitProgressBitcode("reduced-global-variables");
+            BD.EmitProgressBitcode(BD.getProgram(), "reduced-global-variables");
         }
       }
     }
@@ -492,7 +492,7 @@
     ReduceCrashingFunctions(BD, TestFn).reduceList(Functions, Error);
 
     if (Functions.size() < OldSize)
-      BD.EmitProgressBitcode("reduced-function");
+      BD.EmitProgressBitcode(BD.getProgram(), "reduced-function");
   }
 
   // Attempt to delete entire basic blocks at a time to speed up
@@ -509,7 +509,7 @@
     unsigned OldSize = Blocks.size();
     ReduceCrashingBlocks(BD, TestFn).reduceList(Blocks, Error);
     if (Blocks.size() < OldSize)
-      BD.EmitProgressBitcode("reduced-blocks");
+      BD.EmitProgressBitcode(BD.getProgram(), "reduced-blocks");
   }
 
   // Attempt to delete instructions using bisection. This should help out nasty
@@ -602,7 +602,7 @@
     }
   }
 
-  BD.EmitProgressBitcode("reduced-simplified");
+  BD.EmitProgressBitcode(BD.getProgram(), "reduced-simplified");
 
   return false;
 }
@@ -628,7 +628,7 @@
          << (PassesToRun.size() == 1 ? ": " : "es: ")
          << getPassesString(PassesToRun) << '\n';
 
-  EmitProgressBitcode(ID);
+  EmitProgressBitcode(Program, ID);
 
   bool Success = DebugACrash(*this, TestForOptimizerCrash, Error);
   assert(Error.empty());