mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-24 12:20:00 +00:00
[NFC] Replace iterators in PrintHelp with range-based for
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327312 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
584d88ccc7
commit
9b2441e49b
@ -537,8 +537,7 @@ void OptTable::PrintHelp(raw_ostream &OS, const char *Name, const char *Title,
|
||||
|
||||
// Render help text into a map of group-name to a list of (option, help)
|
||||
// pairs.
|
||||
using helpmap_ty = std::map<std::string, std::vector<OptionInfo>>;
|
||||
helpmap_ty GroupedOptionHelp;
|
||||
std::map<std::string, std::vector<OptionInfo>> GroupedOptionHelp;
|
||||
|
||||
for (unsigned Id = 1, e = getNumOptions() + 1; Id != e; ++Id) {
|
||||
// FIXME: Split out option groups.
|
||||
@ -567,11 +566,10 @@ void OptTable::PrintHelp(raw_ostream &OS, const char *Name, const char *Title,
|
||||
}
|
||||
}
|
||||
|
||||
for (helpmap_ty::iterator it = GroupedOptionHelp .begin(),
|
||||
ie = GroupedOptionHelp.end(); it != ie; ++it) {
|
||||
if (it != GroupedOptionHelp .begin())
|
||||
for (auto& OptionGroup : GroupedOptionHelp) {
|
||||
if (OptionGroup.first != GroupedOptionHelp.begin()->first)
|
||||
OS << "\n";
|
||||
PrintHelpOptionList(OS, it->first, it->second);
|
||||
PrintHelpOptionList(OS, OptionGroup.first, OptionGroup.second);
|
||||
}
|
||||
|
||||
OS.flush();
|
||||
|
Loading…
Reference in New Issue
Block a user