Apply simplification suggested by Chris: why assign() when operator = will do?
authorBrian Gaeke <gaeke@uiuc.edu>
Tue, 4 May 2004 22:02:41 +0000 (22:02 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Tue, 4 May 2004 22:02:41 +0000 (22:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13364 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/ToolRunner.h
lib/Support/ToolRunner.cpp
tools/bugpoint/ToolRunner.cpp
tools/bugpoint/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; }
 
index e7f7d219d28c71f768b9c56890064797706414c8..a28527a1c278843563669f05a854edbc8f1527de 100644 (file)
@@ -59,7 +59,7 @@ namespace {
     LLI(const std::string &Path, const std::vector<std::string> *Args)
       : LLIPath(Path) {
       ToolArgs.clear ();
-      if (Args) { ToolArgs.assign (Args->begin (), Args->end ()); }
+      if (Args) { ToolArgs = *Args; }
     }
     
     virtual int ExecuteProgram(const std::string &Bytecode,
@@ -199,7 +199,7 @@ namespace {
     JIT(const std::string &Path, const std::vector<std::string> *Args)
       : LLIPath(Path) {
       ToolArgs.clear ();
-      if (Args) { ToolArgs.assign (Args->begin (), Args->end ()); }
+      if (Args) { ToolArgs = *Args; }
     }
     
     virtual int ExecuteProgram(const std::string &Bytecode,
index e7f7d219d28c71f768b9c56890064797706414c8..a28527a1c278843563669f05a854edbc8f1527de 100644 (file)
@@ -59,7 +59,7 @@ namespace {
     LLI(const std::string &Path, const std::vector<std::string> *Args)
       : LLIPath(Path) {
       ToolArgs.clear ();
-      if (Args) { ToolArgs.assign (Args->begin (), Args->end ()); }
+      if (Args) { ToolArgs = *Args; }
     }
     
     virtual int ExecuteProgram(const std::string &Bytecode,
@@ -199,7 +199,7 @@ namespace {
     JIT(const std::string &Path, const std::vector<std::string> *Args)
       : LLIPath(Path) {
       ToolArgs.clear ();
-      if (Args) { ToolArgs.assign (Args->begin (), Args->end ()); }
+      if (Args) { ToolArgs = *Args; }
     }
     
     virtual int ExecuteProgram(const std::string &Bytecode,
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; }