<rdar://problem/13457391>

LLDB now can use a single dash for all long options for all commands form the command line and from the command interpreter. This involved just switching all calls from getopt_long() to getopt_long_only().

llvm-svn: 178789
This commit is contained in:
Greg Clayton
2013-04-04 20:35:24 +00:00
parent 563d9dc1b2
commit b7ad58a0df
11 changed files with 43 additions and 40 deletions

View File

@@ -760,7 +760,7 @@ show_usage_and_exit (int exit_code)
//----------------------------------------------------------------------
// option descriptors for getopt_long()
// option descriptors for getopt_long_only()
//----------------------------------------------------------------------
static struct option g_long_options[] =
{
@@ -880,7 +880,7 @@ main (int argc, char *argv[])
}
// NULL terminate the short option string.
short_options[short_options_idx++] = '\0';
while ((ch = getopt_long(argc, argv, short_options, g_long_options, &long_option_index)) != -1)
while ((ch = getopt_long_only(argc, argv, short_options, g_long_options, &long_option_index)) != -1)
{
DNBLogDebug("option: ch == %c (0x%2.2x) --%s%c%s\n",
ch, (uint8_t)ch,
@@ -1106,7 +1106,7 @@ main (int argc, char *argv[])
// fprintf(stderr, "error: no architecture was specified\n");
// exit (8);
// }
// Skip any options we consumed with getopt_long
// Skip any options we consumed with getopt_long_only
argc -= optind;
argv += optind;