Apply simplification suggested by Chris: why assign() when operator = will do?
[oota-llvm.git] / include / llvm / Support / ToolRunner.h
index 36cb976e881fc5026b6f5d00ee35108afe203b49..9d1755a2982789215c4e97796cfc2cb799d5b5e2 100644 (file)
@@ -124,7 +124,7 @@ public:
   CBE(const std::string &llcPath, GCC *Gcc,
       const std::vector<std::string> *Args) : LLCPath(llcPath), gcc(Gcc) {
     ToolArgs.clear ();
-    if (Args) { ToolArgs.assign (Args->begin (), Args->end ()); }
+    if (Args) { ToolArgs = *Args; }
   }
   ~CBE() { delete gcc; }
 
@@ -160,7 +160,7 @@ public:
   LLC(const std::string &llcPath, GCC *Gcc,
     const std::vector<std::string> *Args) : LLCPath(llcPath), gcc(Gcc) {
     ToolArgs.clear ();
-    if (Args) { ToolArgs.assign (Args->begin (), Args->end ()); }
+    if (Args) { ToolArgs = *Args; }
   }
   ~LLC() { delete gcc; }