From: Chris Lattner Date: Sun, 19 Oct 2003 02:14:58 +0000 (+0000) Subject: Fix PR #47 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=7b2ccffa594e9bdecddfa1f76a8ca2ae2c377084;p=oota-llvm.git Fix PR #47 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9250 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Support/ToolRunner.cpp b/lib/Support/ToolRunner.cpp index cd385d62a7e..4d0964e38ea 100644 --- a/lib/Support/ToolRunner.cpp +++ b/lib/Support/ToolRunner.cpp @@ -50,7 +50,7 @@ int LLI::ExecuteProgram(const std::string &Bytecode, std::cout << "" << std::flush; DEBUG(std::cerr << "\nAbout to run:\n\t"; - for (unsigned i=0, e = LLIArgs.size(); i != e; ++i) + for (unsigned i=0, e = LLIArgs.size()-1; i != e; ++i) std::cerr << " " << LLIArgs[i]; std::cerr << "\n"; ); @@ -174,7 +174,7 @@ int JIT::ExecuteProgram(const std::string &Bytecode, std::cout << "" << std::flush; DEBUG(std::cerr << "\nAbout to run:\n\t"; - for (unsigned i=0, e = JITArgs.size(); i != e; ++i) + for (unsigned i=0, e = JITArgs.size()-1; i != e; ++i) std::cerr << " " << JITArgs[i]; std::cerr << "\n"; ); @@ -309,7 +309,7 @@ int GCC::ExecuteProgram(const std::string &ProgramFile, // Now that we have a binary, run it! std::cout << "" << std::flush; DEBUG(std::cerr << "\nAbout to run:\n\t"; - for (unsigned i=0, e = ProgramArgs.size(); i != e; ++i) + for (unsigned i=0, e = ProgramArgs.size()-1; i != e; ++i) std::cerr << " " << ProgramArgs[i]; std::cerr << "\n"; ); diff --git a/tools/bugpoint/ToolRunner.cpp b/tools/bugpoint/ToolRunner.cpp index cd385d62a7e..4d0964e38ea 100644 --- a/tools/bugpoint/ToolRunner.cpp +++ b/tools/bugpoint/ToolRunner.cpp @@ -50,7 +50,7 @@ int LLI::ExecuteProgram(const std::string &Bytecode, std::cout << "" << std::flush; DEBUG(std::cerr << "\nAbout to run:\n\t"; - for (unsigned i=0, e = LLIArgs.size(); i != e; ++i) + for (unsigned i=0, e = LLIArgs.size()-1; i != e; ++i) std::cerr << " " << LLIArgs[i]; std::cerr << "\n"; ); @@ -174,7 +174,7 @@ int JIT::ExecuteProgram(const std::string &Bytecode, std::cout << "" << std::flush; DEBUG(std::cerr << "\nAbout to run:\n\t"; - for (unsigned i=0, e = JITArgs.size(); i != e; ++i) + for (unsigned i=0, e = JITArgs.size()-1; i != e; ++i) std::cerr << " " << JITArgs[i]; std::cerr << "\n"; ); @@ -309,7 +309,7 @@ int GCC::ExecuteProgram(const std::string &ProgramFile, // Now that we have a binary, run it! std::cout << "" << std::flush; DEBUG(std::cerr << "\nAbout to run:\n\t"; - for (unsigned i=0, e = ProgramArgs.size(); i != e; ++i) + for (unsigned i=0, e = ProgramArgs.size()-1; i != e; ++i) std::cerr << " " << ProgramArgs[i]; std::cerr << "\n"; );