aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/TableGen/OptionParserEmitter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/utils/TableGen/OptionParserEmitter.cpp')
-rw-r--r--llvm/utils/TableGen/OptionParserEmitter.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/utils/TableGen/OptionParserEmitter.cpp b/llvm/utils/TableGen/OptionParserEmitter.cpp
index 48ae1a0..45edde3 100644
--- a/llvm/utils/TableGen/OptionParserEmitter.cpp
+++ b/llvm/utils/TableGen/OptionParserEmitter.cpp
@@ -266,8 +266,8 @@ static void emitOptionParser(const RecordKeeper &Records, raw_ostream &OS) {
emitSourceFileHeader("Option Parsing Definitions", OS);
// Generate prefix groups.
- typedef SmallVector<SmallString<2>, 2> PrefixKeyT;
- typedef std::map<PrefixKeyT, unsigned> PrefixesT;
+ using PrefixKeyT = SmallVector<SmallString<2>, 2>;
+ using PrefixesT = std::map<PrefixKeyT, unsigned>;
PrefixesT Prefixes;
Prefixes.try_emplace(PrefixKeyT(), 0);
for (const Record &R : llvm::make_pointee_range(Opts)) {
@@ -277,8 +277,8 @@ static void emitOptionParser(const RecordKeeper &Records, raw_ostream &OS) {
}
// Generate sub command groups.
- typedef SmallVector<StringRef, 2> SubCommandKeyT;
- typedef std::map<SubCommandKeyT, unsigned> SubCommandIDsT;
+ using SubCommandKeyT = SmallVector<StringRef, 2>;
+ using SubCommandIDsT = std::map<SubCommandKeyT, unsigned>;
SubCommandIDsT SubCommandIDs;
auto PrintSubCommandIdsOffset = [&SubCommandIDs, &OS](const Record &R) {
@@ -378,9 +378,9 @@ static void emitOptionParser(const RecordKeeper &Records, raw_ostream &OS) {
assert((CurIndex == 0 || !SubCommand.empty()) &&
"Only first subcommand set should be empty!");
for (const auto &SubCommandKey : SubCommand) {
- auto It = std::find_if(
- SubCommands.begin(), SubCommands.end(),
- [&](const Record *R) { return R->getName() == SubCommandKey; });
+ auto It = llvm::find_if(SubCommands, [&](const Record *R) {
+ return R->getName() == SubCommandKey;
+ });
assert(It != SubCommands.end() && "SubCommand not found");
OS << ", " << std::distance(SubCommands.begin(), It) << " /* '"
<< SubCommandKey << "' */";