Add const to some methods and change TestMergedProgram to return the merged
module and take a const BugDriver.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109951 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/bugpoint/BugDriver.h b/tools/bugpoint/BugDriver.h
index 4f345d6..19fc80b 100644
--- a/tools/bugpoint/BugDriver.h
+++ b/tools/bugpoint/BugDriver.h
@@ -179,7 +179,7 @@
                              std::string Bitcode,
                              const std::string &SharedObjects,
                              AbstractInterpreter *AI,
-                             std::string *Error);
+                             std::string *Error) const;
 
   /// executeProgramSafely - Used to create reference output with the "safe"
   /// backend, if reference output is not provided.  If there is a problem with
@@ -187,7 +187,8 @@
   /// Error.
   ///
   std::string executeProgramSafely(const Module *Program,
-                                   std::string OutputFile, std::string *Error);
+                                   std::string OutputFile,
+                                   std::string *Error) const;
 
   /// createReferenceFile - calls compileProgram and then records the output
   /// into ReferenceOutputFile. Returns true if reference file created, false 
@@ -206,7 +207,7 @@
                    const std::string &BitcodeFile = "",
                    const std::string &SharedObj = "",
                    bool RemoveBitcode = false,
-                   std::string *Error = 0);
+                   std::string *Error = 0) const;
 
   /// EmitProgressBitcode - This function is used to output M to a file named
   /// "bugpoint-ID.bc".