llvm.org GIT mirror llvm / 54ec7ae
Minor bugfix, prevents error in LLI git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2989 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 17 years ago
2 changed file(s) with 12 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
167167 ++NumPositionalRequired;
168168 else if (ConsumeAfterOpt) {
169169 // ConsumeAfter cannot be combined with "optional" positional options
170 ErrorParsing |=
171 Opt->error(" error - this positional option will never be matched, "
172 "because it does not Require a value, and a "
173 "cl::ConsumeAfter option is active!");
170 // unless there is only one positional argument...
171 if (PositionalOpts.size() > 2)
172 ErrorParsing |=
173 Opt->error(" error - this positional option will never be matched, "
174 "because it does not Require a value, and a "
175 "cl::ConsumeAfter option is active!");
174176 } else if (UnboundedFound) { // This option does not "require" a value...
175177 // Make sure this option is not specified after an option that eats all
176178 // extra arguments, or this one will never get any!
167167 ++NumPositionalRequired;
168168 else if (ConsumeAfterOpt) {
169169 // ConsumeAfter cannot be combined with "optional" positional options
170 ErrorParsing |=
171 Opt->error(" error - this positional option will never be matched, "
172 "because it does not Require a value, and a "
173 "cl::ConsumeAfter option is active!");
170 // unless there is only one positional argument...
171 if (PositionalOpts.size() > 2)
172 ErrorParsing |=
173 Opt->error(" error - this positional option will never be matched, "
174 "because it does not Require a value, and a "
175 "cl::ConsumeAfter option is active!");
174176 } else if (UnboundedFound) { // This option does not "require" a value...
175177 // Make sure this option is not specified after an option that eats all
176178 // extra arguments, or this one will never get any!