mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Refer to -help instead of --help since this is what tools themselves say.
Also, have tools output -help-hidden rather than refer to --help-hidden, for consistency, and likewise adjust documentation. This doesn't change every mention of --help, only those which seemed clearly safe. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96578 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -650,7 +650,7 @@ void cl::ParseCommandLineOptions(int argc, char **argv,
|
||||
if (Handler == 0) {
|
||||
if (SinkOpts.empty()) {
|
||||
errs() << ProgramName << ": Unknown command line argument '"
|
||||
<< argv[i] << "'. Try: '" << argv[0] << " --help'\n";
|
||||
<< argv[i] << "'. Try: '" << argv[0] << " -help'\n";
|
||||
ErrorParsing = true;
|
||||
} else {
|
||||
for (SmallVectorImpl<Option*>::iterator I = SinkOpts.begin(),
|
||||
@@ -673,7 +673,7 @@ void cl::ParseCommandLineOptions(int argc, char **argv,
|
||||
errs() << ProgramName
|
||||
<< ": Not enough positional command line arguments specified!\n"
|
||||
<< "Must specify at least " << NumPositionalRequired
|
||||
<< " positional arguments: See: " << argv[0] << " --help\n";
|
||||
<< " positional arguments: See: " << argv[0] << " -help\n";
|
||||
|
||||
ErrorParsing = true;
|
||||
} else if (!HasUnlimitedPositionals
|
||||
@@ -681,7 +681,7 @@ void cl::ParseCommandLineOptions(int argc, char **argv,
|
||||
errs() << ProgramName
|
||||
<< ": Too many positional arguments specified!\n"
|
||||
<< "Can specify at most " << PositionalOpts.size()
|
||||
<< " positional arguments: See: " << argv[0] << " --help\n";
|
||||
<< " positional arguments: See: " << argv[0] << " -help\n";
|
||||
ErrorParsing = true;
|
||||
|
||||
} else if (ConsumeAfterOpt == 0) {
|
||||
@@ -1029,7 +1029,7 @@ void generic_parser_base::printOptionInfo(const Option &O,
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// --help and --help-hidden option implementation
|
||||
// -help and -help-hidden option implementation
|
||||
//
|
||||
|
||||
static int OptNameCompare(const void *LHS, const void *RHS) {
|
||||
@@ -1134,7 +1134,7 @@ static HelpPrinter NormalPrinter(false);
|
||||
static HelpPrinter HiddenPrinter(true);
|
||||
|
||||
static cl::opt<HelpPrinter, true, parser<bool> >
|
||||
HOp("help", cl::desc("Display available options (--help-hidden for more)"),
|
||||
HOp("help", cl::desc("Display available options (-help-hidden for more)"),
|
||||
cl::location(NormalPrinter), cl::ValueDisallowed);
|
||||
|
||||
static cl::opt<HelpPrinter, true, parser<bool> >
|
||||
@@ -1222,8 +1222,8 @@ void cl::PrintHelpMessage() {
|
||||
// NormalPrinter variable is a HelpPrinter and the help gets printed when
|
||||
// its operator= is invoked. That's because the "normal" usages of the
|
||||
// help printer is to be assigned true/false depending on whether the
|
||||
// --help option was given or not. Since we're circumventing that we have
|
||||
// to make it look like --help was given, so we assign true.
|
||||
// -help option was given or not. Since we're circumventing that we have
|
||||
// to make it look like -help was given, so we assign true.
|
||||
NormalPrinter = true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user