mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
Support: Use a range-based for
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212973 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
97555d1e20
commit
497ba6c273
@ -1018,13 +1018,12 @@ void cl::ParseCommandLineOptions(int argc, const char * const *argv,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Loop over args and make sure all required args are specified!
|
// Loop over args and make sure all required args are specified!
|
||||||
for (StringMap<Option*>::iterator I = Opts.begin(),
|
for (const auto &Opt : Opts) {
|
||||||
E = Opts.end(); I != E; ++I) {
|
switch (Opt.second->getNumOccurrencesFlag()) {
|
||||||
switch (I->second->getNumOccurrencesFlag()) {
|
|
||||||
case Required:
|
case Required:
|
||||||
case OneOrMore:
|
case OneOrMore:
|
||||||
if (I->second->getNumOccurrences() == 0) {
|
if (Opt.second->getNumOccurrences() == 0) {
|
||||||
I->second->error("must be specified at least once!");
|
Opt.second->error("must be specified at least once!");
|
||||||
ErrorParsing = true;
|
ErrorParsing = true;
|
||||||
}
|
}
|
||||||
// Fall through
|
// Fall through
|
||||||
|
Loading…
Reference in New Issue
Block a user