Apply most suggestions of clang-tidy's performance-unnecessary-value-param

Avoids unnecessary copies. All changes audited & pass tests with asan.
No functional change intended.

llvm-svn: 272190
diff --git a/llvm/tools/bugpoint/BugDriver.h b/llvm/tools/bugpoint/BugDriver.h
index 20efff3..56ed8ab 100644
--- a/llvm/tools/bugpoint/BugDriver.h
+++ b/llvm/tools/bugpoint/BugDriver.h
@@ -76,7 +76,7 @@
   // command line arguments into instance variables of BugDriver.
   //
   bool addSources(const std::vector<std::string> &FileNames);
-  void addPass(std::string p) { PassesToRun.push_back(p); }
+  void addPass(std::string p) { PassesToRun.push_back(std::move(p)); }
   void setPassesToRun(const std::vector<std::string> &PTR) {
     PassesToRun = PTR;
   }
@@ -183,7 +183,7 @@
   /// Error.
   ///
   std::string executeProgramSafely(const Module *Program,
-                                   std::string OutputFile,
+                                   const std::string &OutputFile,
                                    std::string *Error) const;
 
   /// createReferenceFile - calls compileProgram and then records the output