[llvm-commits] CVS: llvm/tools/llvm-db/CLICommand.h CLIDebugger.cpp CLIDebugger.h Commands.cpp llvm-db.cpp

Misha Brukman brukman at cs.uiuc.edu
Thu Apr 21 17:00:18 PDT 2005



Changes in directory llvm/tools/llvm-db:

CLICommand.h updated: 1.2 -> 1.3
CLIDebugger.cpp updated: 1.4 -> 1.5
CLIDebugger.h updated: 1.2 -> 1.3
Commands.cpp updated: 1.8 -> 1.9
llvm-db.cpp updated: 1.8 -> 1.9
---
Log message:

Remove trailing whitespace


---
Diffs of the changes:  (+43 -43)

 CLICommand.h    |    8 ++++----
 CLIDebugger.cpp |   28 ++++++++++++++--------------
 CLIDebugger.h   |    8 ++++----
 Commands.cpp    |   34 +++++++++++++++++-----------------
 llvm-db.cpp     |    8 ++++----
 5 files changed, 43 insertions(+), 43 deletions(-)


Index: llvm/tools/llvm-db/CLICommand.h
diff -u llvm/tools/llvm-db/CLICommand.h:1.2 llvm/tools/llvm-db/CLICommand.h:1.3
--- llvm/tools/llvm-db/CLICommand.h:1.2	Sun Jan  4 23:47:19 2004
+++ llvm/tools/llvm-db/CLICommand.h	Thu Apr 21 18:59:36 2005
@@ -1,10 +1,10 @@
 //===- CLICommand.h - Classes used to represent commands --------*- C++ -*-===//
-// 
+//
 //                     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 defines a small class hierarchy used to represent the various types
@@ -74,7 +74,7 @@
     /// removeOptionName - Eliminate one of the names for this option.
     ///
     void removeOptionName(const std::string &Name) {
-      unsigned i = 0; 
+      unsigned i = 0;
       for (; OptionNames[i] != Name; ++i)
         assert(i+1 < OptionNames.size() && "Didn't find option name!");
       OptionNames.erase(OptionNames.begin()+i);
@@ -101,7 +101,7 @@
     BuiltinCLICommand(const std::string &ShortHelp, const std::string &LongHelp,
                       void (CLIDebugger::*impl)(std::string&))
       : CLICommand(ShortHelp, LongHelp), Impl(impl) {}
-    
+
     void runCommand(CLIDebugger &D, std::string &Arguments) {
       (D.*Impl)(Arguments);
     }


Index: llvm/tools/llvm-db/CLIDebugger.cpp
diff -u llvm/tools/llvm-db/CLIDebugger.cpp:1.4 llvm/tools/llvm-db/CLIDebugger.cpp:1.5
--- llvm/tools/llvm-db/CLIDebugger.cpp:1.4	Tue Oct 26 00:46:17 2004
+++ llvm/tools/llvm-db/CLIDebugger.cpp	Thu Apr 21 18:59:36 2005
@@ -1,12 +1,12 @@
 //===-- CLIDebugger.cpp - Command Line Interface to the Debugger ----------===//
-// 
+//
 //                     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 contains the main implementation of the Command Line Interface to
 // the debugger.
 //
@@ -77,7 +77,7 @@
   addCommand("next", C = new BuiltinCLICommand(
     "Step program until it reaches a new source line, stepping over calls", "",
     &CLIDebugger::nextCommand));
-  addCommand("n", C); 
+  addCommand("n", C);
 
   addCommand("finish", new BuiltinCLICommand(
     "Execute until the selected stack frame returns",
@@ -91,8 +91,8 @@
    "Print backtrace of all stack frames, or innermost COUNT frames",
    "FIXME: describe.  Takes 'n', '-n' or 'full'\n",
     &CLIDebugger::backtraceCommand));
-  addCommand("bt", C); 
- 
+  addCommand("bt", C);
+
   addCommand("up", new BuiltinCLICommand(
     "Select and print stack frame that called this one",
     "An argument says how many frames up to go.\n",
@@ -108,7 +108,7 @@
  "With no argument, print the selected stack frame.  (See also 'info frame').\n"
  "An argument specifies the frame to select.\n",
     &CLIDebugger::frameCommand));
-  addCommand("f", C); 
+  addCommand("f", C);
 
   //===--------------------------------------------------------------------===//
   // Breakpoint related commands
@@ -117,7 +117,7 @@
    "Set breakpoint at specified line or function",
    "FIXME: describe.\n",
     &CLIDebugger::breakCommand));
-  addCommand("b", C); 
+  addCommand("b", C);
 
 
   //===--------------------------------------------------------------------===//
@@ -187,7 +187,7 @@
   // Look up the command in the table.
   std::map<std::string, CLICommand*>::iterator CI =
     CommandTable.lower_bound(Command);
-      
+
   if (Command == "") {
     throw "Null command should not get here!";
   } else if (CI == CommandTable.end() ||
@@ -207,7 +207,7 @@
     // If the next command is a valid completion of this one, we are
     // ambiguous.
     if (++CI2 != CommandTable.end() && isValidPrefix(Command, CI2->first)) {
-      std::string ErrorMsg = 
+      std::string ErrorMsg =
         "Ambiguous command '" + Command + "'.  Options: " + CI->first;
       for (++CI; CI != CommandTable.end() &&
              isValidPrefix(Command, CI->first); ++CI)
@@ -242,7 +242,7 @@
 
     try {
       CLICommand *CurCommand;
-      
+
       if (Command == "") {
         CurCommand = LastCommand;
         Arguments = LastArgs;
@@ -257,7 +257,7 @@
 
       // Finally, execute the command.
       if (CurCommand)
-        CurCommand->runCommand(*this, Arguments);      
+        CurCommand->runCommand(*this, Arguments);
 
     } catch (int RetVal) {
       // The quit command exits the command loop by throwing an integer return
@@ -273,7 +273,7 @@
       std::cout << "ERROR: Debugger caught unexpected exception!\n";
       // Attempt to continue.
     }
-    
+
     // Write the prompt to get the next bit of user input
     std::cout << Prompt;
   }
@@ -302,7 +302,7 @@
     std::cout << "Please answer y or n.\n" << Message << " (y or n) "
               << std::flush;
   }
-  
+
   // Ran out of input?
   return false;
 }


Index: llvm/tools/llvm-db/CLIDebugger.h
diff -u llvm/tools/llvm-db/CLIDebugger.h:1.2 llvm/tools/llvm-db/CLIDebugger.h:1.3
--- llvm/tools/llvm-db/CLIDebugger.h:1.2	Mon Jan  5 23:37:16 2004
+++ llvm/tools/llvm-db/CLIDebugger.h	Thu Apr 21 18:59:36 2005
@@ -1,10 +1,10 @@
 //===- CLIDebugger.h - LLVM Command Line Interface Debugger -----*- C++ -*-===//
-// 
+//
 //                     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 defines the CLIDebugger class, which implements a command line
@@ -62,11 +62,11 @@
     //
     std::string Prompt;   // set prompt, show prompt
     unsigned ListSize;    // set listsize, show listsize
-    
+
     //===------------------------------------------------------------------===//
     // Data to support user interaction
     //
-    
+
     /// CurrentFile - The current source file we are inspecting, or null if
     /// none.
     const SourceFile *CurrentFile;


Index: llvm/tools/llvm-db/Commands.cpp
diff -u llvm/tools/llvm-db/Commands.cpp:1.8 llvm/tools/llvm-db/Commands.cpp:1.9
--- llvm/tools/llvm-db/Commands.cpp:1.8	Mon Dec 13 11:01:53 2004
+++ llvm/tools/llvm-db/Commands.cpp	Thu Apr 21 18:59:36 2005
@@ -1,12 +1,12 @@
 //===-- Commands.cpp - Implement various commands for the CLI -------------===//
-// 
+//
 //                     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 many builtin user commands.
 //
 //===----------------------------------------------------------------------===//
@@ -91,7 +91,7 @@
       std::cout << " ->";
   }
 
-  std::cout << "\t" << std::string(LineStart, LineEnd) << "\n"; 
+  std::cout << "\t" << std::string(LineStart, LineEnd) << "\n";
   return false;
 }
 
@@ -115,9 +115,9 @@
       std::cout << getProgramInfo().getFunction(FuncDesc).getSymbolicName();
     else
       std::cout << "<unknown function>";
-    
+
     CurrentFile = &FileDesc->getSourceText();
-    
+
     std::cout << " at " << CurrentFile->getFilename() << ":" << LineNo;
     if (ColNo) std::cout << ":" << ColNo;
     std::cout << "\n";
@@ -167,7 +167,7 @@
   std::string Tok = getToken(Val);
   if (Tok.empty() || (isOnlyOption && !getToken(Val).empty()))
     throw std::string(Msg) + " expects an unsigned integer argument.";
-  
+
   char *EndPtr;
   unsigned Result = strtoul(Tok.c_str(), &EndPtr, 0);
   if (EndPtr != Tok.c_str()+Tok.size())
@@ -179,7 +179,7 @@
 /// getOptionalUnsignedIntegerOption - This method is just like
 /// getUnsignedIntegerOption, but if the argument value is not specified, a
 /// default is returned instead of causing an error.
-static unsigned 
+static unsigned
 getOptionalUnsignedIntegerOption(const char *Msg, unsigned Default,
                                  std::string &Val, bool isOnlyOption = true) {
   // Check to see if the value was specified...
@@ -201,13 +201,13 @@
   // FIXME: tokenizing by whitespace is clearly incorrect.  Instead we should
   // honor quotes and other things that a shell would.  Also in the future we
   // should support redirection of standard IO.
- 
+
   std::vector<std::string> Arguments;
   for (std::string A = getToken(Options); !A.empty(); A = getToken(Options))
     Arguments.push_back(A);
   Dbg.setProgramArguments(Arguments.begin(), Arguments.end());
 }
-                                                
+
 
 //===----------------------------------------------------------------------===//
 //                   Program startup and shutdown options
@@ -477,7 +477,7 @@
   // Figure out where the user wants a breakpoint.
   const SourceFile *File;
   unsigned LineNo;
-  
+
   // Check to see if the user specified a line specifier.
   std::string Option = getToken(Options);  // strip whitespace
   if (!Option.empty()) {
@@ -489,13 +489,13 @@
     // Build a line specifier for the current stack frame.
     throw "FIXME: breaking at the current location is not implemented yet!";
   }
-  
+
   if (!File) File = CurrentFile;
   if (File == 0)
     throw "Unknown file to place breakpoint!";
 
   std::cerr << "Break: " << File->getFilename() << ":" << LineNo << "\n";
-  
+
   throw "breakpoints not implemented yet!";
 }
 
@@ -542,7 +542,7 @@
               << SF.getLanguage().getSourceLanguageName() << "\n";
 
   } else if (What == "sources") {
-    const std::map<const GlobalVariable*, SourceFileInfo*> &SourceFiles = 
+    const std::map<const GlobalVariable*, SourceFileInfo*> &SourceFiles =
       getProgramInfo().getSourceFiles();
     std::cout << "Source files for the program:\n";
     for (std::map<const GlobalVariable*, SourceFileInfo*>::const_iterator I =
@@ -607,7 +607,7 @@
         std::string Name = getToken(FirstPart);
         if (!getToken(FirstPart).empty())
           throw "Extra junk in line specifier after '" + Name + "'.";
-        SourceFunctionInfo *SFI = 
+        SourceFunctionInfo *SFI =
           getCurrentLanguage().lookupFunction(Name, getProgramInfo(),
                                               TheRuntimeInfo);
         if (SFI == 0)
@@ -651,7 +651,7 @@
 
   // Handle "list foo," correctly, by returning " " as the second token
   Options += " ";
-  
+
   std::string FirstLineSpec = getToken(Options, ",");
   std::string SecondLineSpec = getToken(Options, ",");
   if (!getToken(Options, ",").empty())
@@ -689,7 +689,7 @@
     }
 
   } else {
-    // Parse two line specifiers... 
+    // Parse two line specifiers...
     const SourceFile *StartFile, *EndFile;
     unsigned StartLineNo, EndLineNo;
     parseLineSpec(FirstLineSpec, StartFile, StartLineNo);


Index: llvm/tools/llvm-db/llvm-db.cpp
diff -u llvm/tools/llvm-db/llvm-db.cpp:1.8 llvm/tools/llvm-db/llvm-db.cpp:1.9
--- llvm/tools/llvm-db/llvm-db.cpp:1.8	Wed Dec 29 23:36:07 2004
+++ llvm/tools/llvm-db/llvm-db.cpp	Thu Apr 21 18:59:36 2005
@@ -1,10 +1,10 @@
 //===- llvm-db.cpp - LLVM Debugger ----------------------------------------===//
-// 
+//
 //                     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 utility implements a simple text-mode front-end to the LLVM debugger
@@ -35,7 +35,7 @@
                     cl::desc("Add directory to the search for source files"));
   cl::alias SDA("d", cl::desc("Alias for --directory"),
                 cl::aliasopt(SourceDirectories));
-  
+
   cl::opt<std::string>
   WorkingDirectory("cd", cl::desc("Use directory as current working directory"),
                    cl::value_desc("directory"));
@@ -73,7 +73,7 @@
     Dbg.setWorkingDirectory(WorkingDirectory);
     for (unsigned i = 0, e = SourceDirectories.size(); i != e; ++i)
       D.addSourceDirectory(SourceDirectories[i]);
-    
+
     if (!InputArgs.empty()) {
       try {
         D.fileCommand(InputArgs[0]);






More information about the llvm-commits mailing list