diff options
| author | Greg Clayton <gclayton@apple.com> | 2013-04-04 20:35:24 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2013-04-04 20:35:24 +0000 |
| commit | b7ad58a0dfe2a3db177472dacadc474a608e9bc0 (patch) | |
| tree | 70e9c446c7e28b8b945c37d2665b027f9e8e67ea /lldb/tools/driver/Driver.cpp | |
| parent | 563d9dc1b2ad4b7622575f7fbfdb99c84400d442 (diff) | |
| download | bcm5719-llvm-b7ad58a0dfe2a3db177472dacadc474a608e9bc0.tar.gz bcm5719-llvm-b7ad58a0dfe2a3db177472dacadc474a608e9bc0.zip | |
<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
Diffstat (limited to 'lldb/tools/driver/Driver.cpp')
| -rw-r--r-- | lldb/tools/driver/Driver.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lldb/tools/driver/Driver.cpp b/lldb/tools/driver/Driver.cpp index 236a2f090bc..ede1e8813e7 100644 --- a/lldb/tools/driver/Driver.cpp +++ b/lldb/tools/driver/Driver.cpp @@ -510,7 +510,7 @@ Driver::ParseArgs (int argc, const char *argv[], FILE *out_fh, bool &exit) return error; } - // Build the option_string argument for call to getopt_long. + // Build the option_string argument for call to getopt_long_only. for (int i = 0; long_options[i].name != NULL; ++i) { @@ -541,7 +541,7 @@ Driver::ParseArgs (int argc, const char *argv[], FILE *out_fh, bool &exit) m_debugger.SkipLLDBInitFiles (false); m_debugger.SkipAppInitFiles (false); - // Prepare for & make calls to getopt_long. + // Prepare for & make calls to getopt_long_only. #if __GLIBC__ optind = 0; #else @@ -552,7 +552,7 @@ Driver::ParseArgs (int argc, const char *argv[], FILE *out_fh, bool &exit) while (1) { int long_options_index = -1; - val = ::getopt_long (argc, const_cast<char **>(argv), option_string.c_str(), long_options, &long_options_index); + val = ::getopt_long_only (argc, const_cast<char **>(argv), option_string.c_str(), long_options, &long_options_index); if (val == -1) break; @@ -738,7 +738,7 @@ Driver::ParseArgs (int argc, const char *argv[], FILE *out_fh, bool &exit) // are arguments for the inferior program. If no file was specified with // -f, then what is left is the program name followed by any arguments. - // Skip any options we consumed with getopt_long + // Skip any options we consumed with getopt_long_only argc -= optind; argv += optind; @@ -755,7 +755,7 @@ Driver::ParseArgs (int argc, const char *argv[], FILE *out_fh, bool &exit) } else { - // Skip any options we consumed with getopt_long + // Skip any options we consumed with getopt_long_only argc -= optind; //argv += optind; // Commented out to keep static analyzer happy |

