summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2014-07-14 19:24:13 +0000
committerJustin Bogner <mail@justinbogner.com>2014-07-14 19:24:13 +0000
commit973b2ff322ca2a04540aa035dc80ae71e6c25d7e (patch)
treeb4e39a8a55ad8f4f615ec0cd89fe3aa6a37235d6 /llvm/lib/Support/CommandLine.cpp
parentcd3acb5604518cbea052b820bd02edb6127d88c6 (diff)
downloadbcm5719-llvm-973b2ff322ca2a04540aa035dc80ae71e6c25d7e.tar.gz
bcm5719-llvm-973b2ff322ca2a04540aa035dc80ae71e6c25d7e.zip
Support: Use a range-based for
llvm-svn: 212973
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
-rw-r--r--llvm/lib/Support/CommandLine.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp
index 87348f7342e..586eceae757 100644
--- a/llvm/lib/Support/CommandLine.cpp
+++ b/llvm/lib/Support/CommandLine.cpp
@@ -1018,13 +1018,12 @@ void cl::ParseCommandLineOptions(int argc, const char * const *argv,
}
// Loop over args and make sure all required args are specified!
- for (StringMap<Option*>::iterator I = Opts.begin(),
- E = Opts.end(); I != E; ++I) {
- switch (I->second->getNumOccurrencesFlag()) {
+ for (const auto &Opt : Opts) {
+ switch (Opt.second->getNumOccurrencesFlag()) {
case Required:
case OneOrMore:
- if (I->second->getNumOccurrences() == 0) {
- I->second->error("must be specified at least once!");
+ if (Opt.second->getNumOccurrences() == 0) {
+ Opt.second->error("must be specified at least once!");
ErrorParsing = true;
}
// Fall through
OpenPOWER on IntegriCloud