diff options
author | Chris Lattner <sabre@nondot.org> | 2002-07-22 02:21:57 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-07-22 02:21:57 +0000 |
commit | d49ea884888f76d1ea5188c493adcadc3f646b61 (patch) | |
tree | 5be8372de859e51611069830a94be1d23dd98d19 /llvm/support/lib/Support/CommandLine.cpp | |
parent | 17570e182a00c7302a28d758eb73ca76c0f06d22 (diff) | |
download | bcm5719-llvm-d49ea884888f76d1ea5188c493adcadc3f646b61.tar.gz bcm5719-llvm-d49ea884888f76d1ea5188c493adcadc3f646b61.zip |
Minor bugfix, prevents error in LLI
llvm-svn: 2989
Diffstat (limited to 'llvm/support/lib/Support/CommandLine.cpp')
-rw-r--r-- | llvm/support/lib/Support/CommandLine.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/support/lib/Support/CommandLine.cpp b/llvm/support/lib/Support/CommandLine.cpp index d11fbd7119e..001fdac476d 100644 --- a/llvm/support/lib/Support/CommandLine.cpp +++ b/llvm/support/lib/Support/CommandLine.cpp @@ -168,10 +168,12 @@ void cl::ParseCommandLineOptions(int &argc, char **argv, ++NumPositionalRequired; else if (ConsumeAfterOpt) { // ConsumeAfter cannot be combined with "optional" positional options - ErrorParsing |= - Opt->error(" error - this positional option will never be matched, " - "because it does not Require a value, and a " - "cl::ConsumeAfter option is active!"); + // unless there is only one positional argument... + if (PositionalOpts.size() > 2) + ErrorParsing |= + Opt->error(" error - this positional option will never be matched, " + "because it does not Require a value, and a " + "cl::ConsumeAfter option is active!"); } else if (UnboundedFound) { // This option does not "require" a value... // Make sure this option is not specified after an option that eats all // extra arguments, or this one will never get any! |