Added LLVM project notice to the top of every C++ source file.
[oota-llvm.git] / tools / bugpoint / ToolRunner.cpp
index cd385d62a7e9200af8408ad1cd90d6c539984bc6..a66b868c22cdc5f064c888b2816b8f6810ea0e7a 100644 (file)
@@ -1,9 +1,17 @@
 //===-- ToolRunner.cpp ----------------------------------------------------===//
+// 
+//                     The LLVM Compiler Infrastructure
+//
+// This file was developed by the LLVM research group and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// 
+//===----------------------------------------------------------------------===//
 //
 // This file implements the interfaces described in the ToolRunner.h file.
 //
 //===----------------------------------------------------------------------===//
 
+#define DEBUG_TYPE "toolrunner"
 #include "llvm/Support/ToolRunner.h"
 #include "Support/Debug.h"
 #include "Support/FileUtilities.h"
@@ -49,8 +57,8 @@ int LLI::ExecuteProgram(const std::string &Bytecode,
   LLIArgs.push_back(0);
 
   std::cout << "<lli>" << std::flush;
-  DEBUG(std::cerr << "\nAbout to run:\n\t";
-        for (unsigned i=0, e = LLIArgs.size(); i != e; ++i)
+  DEBUG(std::cerr << "\nAbout to run:\t";
+        for (unsigned i=0, e = LLIArgs.size()-1; i != e; ++i)
           std::cerr << " " << LLIArgs[i];
         std::cerr << "\n";
         );
@@ -173,8 +181,8 @@ int JIT::ExecuteProgram(const std::string &Bytecode,
   JITArgs.push_back(0);
 
   std::cout << "<jit>" << std::flush;
-  DEBUG(std::cerr << "\nAbout to run:\n\t";
-        for (unsigned i=0, e = JITArgs.size(); i != e; ++i)
+  DEBUG(std::cerr << "\nAbout to run:\t";
+        for (unsigned i=0, e = JITArgs.size()-1; i != e; ++i)
           std::cerr << " " << JITArgs[i];
         std::cerr << "\n";
         );
@@ -308,8 +316,8 @@ int GCC::ExecuteProgram(const std::string &ProgramFile,
 
   // Now that we have a binary, run it!
   std::cout << "<program>" << std::flush;
-  DEBUG(std::cerr << "\nAbout to run:\n\t";
-        for (unsigned i=0, e = ProgramArgs.size(); i != e; ++i)
+  DEBUG(std::cerr << "\nAbout to run:\t";
+        for (unsigned i=0, e = ProgramArgs.size()-1; i != e; ++i)
           std::cerr << " " << ProgramArgs[i];
         std::cerr << "\n";
         );