<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 

llvm-svn: 184163
This commit is contained in:
Enrico Granata 2013-06-18 01:17:46 +00:00
parent 85d3eeb6e7
commit ca5acdbef8
2 changed files with 2 additions and 12 deletions

View File

@ -107,9 +107,6 @@ public:
const char *
GetSyntax ();
const char *
Translate ();
const char *
GetCommandName ();
@ -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; }

View File

@ -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);
}
@ -104,13 +104,6 @@ CommandObject::GetSyntax ()
return m_cmd_syntax.c_str();
}
const char *
CommandObject::Translate ()
{
//return m_cmd_func_name.c_str();
return "This function is currently not implemented.";
}
const char *
CommandObject::GetCommandName ()
{