Skip to content

Commit d29c105

Browse files
committed
Use auto for sort comparator
1 parent d3cab55 commit d29c105

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

llvm/utils/TableGen/SearchableTableEmitter.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -651,12 +651,9 @@ void SearchableTableEmitter::collectEnumEntries(
651651
if (ValueField.empty()) {
652652
// Copy the map entries for sorting and clear the map.
653653
auto SavedEntries = Enum.Entries.takeVector();
654-
llvm::stable_sort(
655-
SavedEntries,
656-
[](const std::pair<const Record *, GenericEnum::Entry> &LHS,
657-
const std::pair<const Record *, GenericEnum::Entry> &RHS) {
658-
return LHS.second.Name < RHS.second.Name;
659-
});
654+
llvm::stable_sort(SavedEntries, [](const auto &LHS, const auto &RHS) {
655+
return LHS.second.Name < RHS.second.Name;
656+
});
660657

661658
// Repopulate entries using the new sorted order.
662659
for (auto [Idx, Entry] : enumerate(SavedEntries))

0 commit comments

Comments
 (0)