From: Brian Gaeke Date: Tue, 4 May 2004 22:02:41 +0000 (+0000) Subject: Apply simplification suggested by Chris: why assign() when operator = will do? X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=48b008db57cf1ffabf949364622c9ecfe0ec85c4;p=oota-llvm.git Apply simplification suggested by Chris: why assign() when operator = will do? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13364 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/ToolRunner.h b/include/llvm/Support/ToolRunner.h index 36cb976e881..9d1755a2982 100644 --- a/include/llvm/Support/ToolRunner.h +++ b/include/llvm/Support/ToolRunner.h @@ -124,7 +124,7 @@ public: CBE(const std::string &llcPath, GCC *Gcc, const std::vector *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 *Args) : LLCPath(llcPath), gcc(Gcc) { ToolArgs.clear (); - if (Args) { ToolArgs.assign (Args->begin (), Args->end ()); } + if (Args) { ToolArgs = *Args; } } ~LLC() { delete gcc; } diff --git a/lib/Support/ToolRunner.cpp b/lib/Support/ToolRunner.cpp index e7f7d219d28..a28527a1c27 100644 --- a/lib/Support/ToolRunner.cpp +++ b/lib/Support/ToolRunner.cpp @@ -59,7 +59,7 @@ namespace { LLI(const std::string &Path, const std::vector *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 *Args) : LLIPath(Path) { ToolArgs.clear (); - if (Args) { ToolArgs.assign (Args->begin (), Args->end ()); } + if (Args) { ToolArgs = *Args; } } virtual int ExecuteProgram(const std::string &Bytecode, diff --git a/tools/bugpoint/ToolRunner.cpp b/tools/bugpoint/ToolRunner.cpp index e7f7d219d28..a28527a1c27 100644 --- a/tools/bugpoint/ToolRunner.cpp +++ b/tools/bugpoint/ToolRunner.cpp @@ -59,7 +59,7 @@ namespace { LLI(const std::string &Path, const std::vector *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 *Args) : LLIPath(Path) { ToolArgs.clear (); - if (Args) { ToolArgs.assign (Args->begin (), Args->end ()); } + if (Args) { ToolArgs = *Args; } } virtual int ExecuteProgram(const std::string &Bytecode, diff --git a/tools/bugpoint/ToolRunner.h b/tools/bugpoint/ToolRunner.h index 36cb976e881..9d1755a2982 100644 --- a/tools/bugpoint/ToolRunner.h +++ b/tools/bugpoint/ToolRunner.h @@ -124,7 +124,7 @@ public: CBE(const std::string &llcPath, GCC *Gcc, const std::vector *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 *Args) : LLCPath(llcPath), gcc(Gcc) { ToolArgs.clear (); - if (Args) { ToolArgs.assign (Args->begin (), Args->end ()); } + if (Args) { ToolArgs = *Args; } } ~LLC() { delete gcc; }