[llvm] [TableGen] Rework error reporting for duplicate Feature/Processor. (PR #102257)
Tomas Matheson via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 7 09:40:53 PDT 2024
================
@@ -2112,14 +2112,22 @@ struct LessRecordByID {
}
};
-/// Sorting predicate to sort record pointers by their
-/// name field.
+/// Sorting predicate to sort record pointers by their Name field.
struct LessRecordFieldName {
bool operator()(const Record *Rec1, const Record *Rec2) const {
return Rec1->getValueAsString("Name") < Rec2->getValueAsString("Name");
}
};
+/// Sorting predicate to sort record pointers by their Name field, and break
+/// ties using record name.
+struct LessRecordFieldNameAndName {
----------------
tmatheson-arm wrote:
If there's only one use of this, should it live next to that use? This will get recompiled every time `Record.h` is included anywhere.
https://github.com/llvm/llvm-project/pull/102257
More information about the llvm-commits
mailing list