[llvm] 2a4ee60 - [TableGen] Use LessRecord() for the sort in getAllDerivedDefinitions instead of re-implementing it. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu May 16 15:47:00 PDT 2024
Author: Craig Topper
Date: 2024-05-16T15:42:16-07:00
New Revision: 2a4ee605b03bc69c296d0388239d9c837e787995
URL: https://github.com/llvm/llvm-project/commit/2a4ee605b03bc69c296d0388239d9c837e787995
DIFF: https://github.com/llvm/llvm-project/commit/2a4ee605b03bc69c296d0388239d9c837e787995.diff
LOG: [TableGen] Use LessRecord() for the sort in getAllDerivedDefinitions instead of re-implementing it. NFC
Added:
Modified:
llvm/lib/TableGen/Record.cpp
Removed:
################################################################################
diff --git a/llvm/lib/TableGen/Record.cpp b/llvm/lib/TableGen/Record.cpp
index 2b3e8a0c7f848..f9acc68ce5c7f 100644
--- a/llvm/lib/TableGen/Record.cpp
+++ b/llvm/lib/TableGen/Record.cpp
@@ -3251,9 +3251,7 @@ std::vector<Record *> RecordKeeper::getAllDerivedDefinitions(
Defs.push_back(OneDef.second.get());
}
- llvm::sort(Defs, [](Record *LHS, Record *RHS) {
- return LHS->getName().compare_numeric(RHS->getName()) < 0;
- });
+ llvm::sort(Defs, LessRecord());
return Defs;
}
More information about the llvm-commits
mailing list