[Lldb-commits] [lldb] r184163 - <rdar://problem/13270271>

Enrico Granata egranata at apple.com
Mon Jun 17 18:17:47 PDT 2013


Author: enrico
Date: Mon Jun 17 20:17:46 2013
New Revision: 184163

URL: http://llvm.org/viewvc/llvm-project?rev=184163&view=rev
Log:
<rdar://problem/13270271>

Only add the — (double dash) separator to a command syntax if it has any options to be separated from arguments
Also remove the unused Translate() method from CommandObject 

Modified:
    lldb/trunk/include/lldb/Interpreter/CommandObject.h
    lldb/trunk/source/Interpreter/CommandObject.cpp

Modified: lldb/trunk/include/lldb/Interpreter/CommandObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandObject.h?rev=184163&r1=184162&r2=184163&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/CommandObject.h (original)
+++ lldb/trunk/include/lldb/Interpreter/CommandObject.h Mon Jun 17 20:17:46 2013
@@ -108,9 +108,6 @@ public:
     GetSyntax ();
 
     const char *
-    Translate ();
-
-    const char *
     GetCommandName ();
 
     void
@@ -129,7 +126,7 @@ public:
     // the Command object from the Command dictionary (aliases have their own
     // deletion scheme, so they do not need to care about this)
     virtual bool
-    IsRemovable() const { return false; }
+    IsRemovable () const { return false; }
     
     bool
     IsAlias () { return m_is_alias; }

Modified: lldb/trunk/source/Interpreter/CommandObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandObject.cpp?rev=184163&r1=184162&r2=184163&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandObject.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandObject.cpp Mon Jun 17 20:17:46 2013
@@ -94,7 +94,7 @@ CommandObject::GetSyntax ()
         if (m_arguments.size() > 0)
         {
             syntax_str.Printf (" ");
-            if (WantsRawCommandString())
+            if (WantsRawCommandString() && GetOptions() && GetOptions()->NumCommandOptions())
                 syntax_str.Printf("-- ");
             GetFormattedCommandArguments (syntax_str);
         }
@@ -105,13 +105,6 @@ CommandObject::GetSyntax ()
 }
 
 const char *
-CommandObject::Translate ()
-{
-    //return m_cmd_func_name.c_str();
-    return "This function is currently not implemented.";
-}
-
-const char *
 CommandObject::GetCommandName ()
 {
     return m_cmd_name.c_str();





More information about the lldb-commits mailing list