Skip to content

Commit 396a041

Browse files
committed
Address review comments.
1 parent 845a073 commit 396a041

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llvm/include/llvm/Option/OptTable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ class LLVM_ABI OptTable {
148148
StringRef SubCommand) const {
149149
assert(!SubCommand.empty() &&
150150
"This helper is only for valid registered subcommands.");
151-
typename ArrayRef<OptTable::SubCommand>::iterator SCIT =
151+
auto SCIT =
152152
std::find_if(SubCommands.begin(), SubCommands.end(),
153153
[&](const auto &C) { return SubCommand == C.Name; });
154154
assert(SCIT != SubCommands.end() &&
@@ -228,7 +228,7 @@ class LLVM_ABI OptTable {
228228
/// Return the string table used for option names.
229229
const StringTable &getStrTable() const { return *StrTable; }
230230

231-
const ArrayRef<SubCommand> getSubCommands() const { return SubCommands; }
231+
ArrayRef<SubCommand> getSubCommands() const { return SubCommands; }
232232

233233
/// Return the prefixes table used for option names.
234234
ArrayRef<StringTable::Offset> getPrefixesTable() const {

llvm/lib/Option/OptTable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ void OptTable::internalPrintHelp(
756756
// pairs.
757757
std::map<std::string, std::vector<OptionInfo>> GroupedOptionHelp;
758758

759-
typename ArrayRef<OptTable::SubCommand>::iterator ActiveSubCommand =
759+
auto ActiveSubCommand =
760760
std::find_if(SubCommands.begin(), SubCommands.end(),
761761
[&](const auto &C) { return SubCommand == C.Name; });
762762
if (!SubCommand.empty()) {

0 commit comments

Comments
 (0)