[llvm-commits] [llvm] r118173 - in /llvm/trunk/tools/bugpoint: OptimizerDriver.cpp ToolRunner.cpp

Mikhail Glushenkov foldr at codedgers.com
Wed Nov 3 09:14:07 PDT 2010


Author: foldr
Date: Wed Nov  3 11:14:07 2010
New Revision: 118173

URL: http://llvm.org/viewvc/llvm-project?rev=118173&view=rev
Log:
80-col violations, trailing whitespace.

Modified:
    llvm/trunk/tools/bugpoint/OptimizerDriver.cpp
    llvm/trunk/tools/bugpoint/ToolRunner.cpp

Modified: llvm/trunk/tools/bugpoint/OptimizerDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/OptimizerDriver.cpp?rev=118173&r1=118172&r2=118173&view=diff
==============================================================================
--- llvm/trunk/tools/bugpoint/OptimizerDriver.cpp (original)
+++ llvm/trunk/tools/bugpoint/OptimizerDriver.cpp Wed Nov  3 11:14:07 2010
@@ -126,12 +126,12 @@
            << ErrMsg << "\n";
     return(1);
   }
-  
+
   std::string ErrInfo;
   tool_output_file InFile(inputFilename.c_str(), ErrInfo,
                           raw_fd_ostream::F_Binary);
-  
-  
+
+
   if (!ErrInfo.empty()) {
     errs() << "Error opening bitcode file: " << inputFilename.str() << "\n";
     return 1;
@@ -195,7 +195,7 @@
     prog = sys::Program::FindProgramByName("valgrind");
   else
     prog = tool;
-  
+
   // Redirect stdout and stderr to nowhere if SilencePasses is given
   sys::Path Nowhere;
   const sys::Path *Redirects[3] = {0, &Nowhere, &Nowhere};

Modified: llvm/trunk/tools/bugpoint/ToolRunner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/ToolRunner.cpp?rev=118173&r1=118172&r2=118173&view=diff
==============================================================================
--- llvm/trunk/tools/bugpoint/ToolRunner.cpp (original)
+++ llvm/trunk/tools/bugpoint/ToolRunner.cpp Wed Nov  3 11:14:07 2010
@@ -141,7 +141,7 @@
   for (const char **Arg = Args; *Arg; ++Arg)
     OS << " " << *Arg;
   OS << "\n";
-  
+
   // Rerun the compiler, capturing any error messages to print them.
   sys::Path ErrorFilename("bugpoint.program_error_messages");
   std::string ErrMsg;
@@ -206,7 +206,8 @@
   LLIArgs.push_back(LLIPath.c_str());
   LLIArgs.push_back("-force-interpreter=true");
 
-  for (std::vector<std::string>::const_iterator i = SharedLibs.begin(), e = SharedLibs.end(); i != e; ++i) {
+  for (std::vector<std::string>::const_iterator i = SharedLibs.begin(),
+         e = SharedLibs.end(); i != e; ++i) {
     LLIArgs.push_back("-load");
     LLIArgs.push_back((*i).c_str());
   }
@@ -251,7 +252,7 @@
 // Custom execution command implementation of AbstractIntepreter interface
 //
 // Allows using a custom command for executing the bitcode, thus allows,
-// for example, to invoke a cross compiler for code generation followed by 
+// for example, to invoke a cross compiler for code generation followed by
 // a simulator that executes the generated binary.
 namespace {
   class CustomExecutor : public AbstractInterpreter {
@@ -299,7 +300,7 @@
 
   return RunProgramWithTimeout(
     sys::Path(ExecutionCommand),
-    &ProgramArgs[0], sys::Path(InputFile), sys::Path(OutputFile), 
+    &ProgramArgs[0], sys::Path(InputFile), sys::Path(OutputFile),
     sys::Path(OutputFile), Timeout, MemoryLimit);
 }
 
@@ -317,14 +318,14 @@
   // defining a full command line as the command instead of just the
   // executed program. We cannot just pass the whole string after the command
   // as a single argument because then program sees only a single
-  // command line argument (with spaces in it: "foo bar" instead 
+  // command line argument (with spaces in it: "foo bar" instead
   // of "foo" and "bar").
 
-  // code borrowed from: 
+  // code borrowed from:
   // http://oopweb.com/CPP/Documents/CPPHOWTO/Volume/C++Programming-HOWTO-7.html
-  std::string::size_type lastPos = 
+  std::string::size_type lastPos =
     ExecCommandLine.find_first_not_of(delimiters, 0);
-  std::string::size_type pos = 
+  std::string::size_type pos =
     ExecCommandLine.find_first_of(delimiters, lastPos);
 
   while (std::string::npos != pos || std::string::npos != lastPos) {
@@ -341,8 +342,8 @@
 
   std::string CmdPath = sys::Program::FindProgramByName(Command).str();
   if (CmdPath.empty()) {
-    Message = 
-      std::string("Cannot find '") + Command + 
+    Message =
+      std::string("Cannot find '") + Command +
       "' in PATH!\n";
     return 0;
   }
@@ -355,7 +356,7 @@
 //===----------------------------------------------------------------------===//
 // LLC Implementation of AbstractIntepreter interface
 //
-GCC::FileType LLC::OutputCode(const std::string &Bitcode, 
+GCC::FileType LLC::OutputCode(const std::string &Bitcode,
                               sys::Path &OutputAsmFile, std::string &Error,
                               unsigned Timeout, unsigned MemoryLimit) {
   const char *Suffix = (UseIntegratedAssembler ? ".llc.o" : ".llc.s");
@@ -376,10 +377,10 @@
   LLCArgs.push_back("-o");
   LLCArgs.push_back(OutputAsmFile.c_str()); // Output to the Asm file
   LLCArgs.push_back(Bitcode.c_str());      // This is the input bitcode
-  
+
   if (UseIntegratedAssembler)
     LLCArgs.push_back("-filetype=obj");
-  
+
   LLCArgs.push_back (0);
 
   outs() << (UseIntegratedAssembler ? "<llc-ia>" : "<llc>");
@@ -394,7 +395,7 @@
                             Timeout, MemoryLimit))
     Error = ProcessFailure(sys::Path(LLCPath), &LLCArgs[0],
                            Timeout, MemoryLimit);
-  return UseIntegratedAssembler ? GCC::ObjectFile : GCC::AsmFile;  
+  return UseIntegratedAssembler ? GCC::ObjectFile : GCC::AsmFile;
 }
 
 void LLC::compileProgram(const std::string &Bitcode, std::string *Error,
@@ -474,7 +475,7 @@
                                const std::vector<std::string> &GCCArgs =
                                  std::vector<std::string>(),
                                const std::vector<std::string> &SharedLibs =
-                                 std::vector<std::string>(), 
+                                 std::vector<std::string>(),
                                unsigned Timeout = 0,
                                unsigned MemoryLimit = 0);
   };
@@ -677,9 +678,9 @@
         GCCArgs.push_back("-force_cpusubtype_ALL");
     }
   }
-  
+
   GCCArgs.push_back(ProgramFile.c_str());  // Specify the input filename.
-  
+
   GCCArgs.push_back("-x");
   GCCArgs.push_back("none");
   GCCArgs.push_back("-o");
@@ -793,7 +794,7 @@
   OutputFile = uniqueFilename.str();
 
   std::vector<const char*> GCCArgs;
-  
+
   GCCArgs.push_back(GCCPath.c_str());
 
   if (TargetTriple.getArch() == Triple::x86)
@@ -816,7 +817,7 @@
     GCCArgs.push_back("-G");       // Compile a shared library, `-G' for Sparc
   else if (TargetTriple.getOS() == Triple::Darwin) {
     // link all source files into a single module in data segment, rather than
-    // generating blocks. dynamic_lookup requires that you set 
+    // generating blocks. dynamic_lookup requires that you set
     // MACOSX_DEPLOYMENT_TARGET=10.3 in your env.  FIXME: it would be better for
     // bugpoint to just pass that in the environment of GCC.
     GCCArgs.push_back("-single_module");
@@ -837,8 +838,8 @@
   GCCArgs.push_back(OutputFile.c_str()); // Output to the right filename.
   GCCArgs.push_back("-O2");              // Optimize the program a bit.
 
-  
-  
+
+
   // Add any arguments intended for GCC. We locate them here because this is
   // most likely -L and -l options that need to come before other libraries but
   // after the source. Other options won't be sensitive to placement on the
@@ -847,7 +848,7 @@
     GCCArgs.push_back(ArgsForGCC[i].c_str());
   GCCArgs.push_back(0);                    // NULL terminator
 
-  
+
 
   outs() << "<gcc>"; outs().flush();
   DEBUG(errs() << "\nAbout to run:\t";





More information about the llvm-commits mailing list