[llvm] [TableGen] Rework error reporting for duplicate Feature/Processor. (PR #102257)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 7 07:23:15 PDT 2024


================
@@ -2290,3 +2283,24 @@ void PredTransitions::dump() const {
   }
 }
 #endif // NDEBUG
+
+/// Verifies that there are no duplicate records with the same "Name" field.
+/// If there are, reports a fatal error message (and exits). Assumes that
+/// Records are sorted on the "Name" field.
+void llvm::checkDuplicateRecords(ArrayRef<Record *> Records,
+                                 StringRef ObjectName) {
+  auto I = std::adjacent_find(Records.begin(), Records.end(),
----------------
jurahul wrote:

Done.

https://github.com/llvm/llvm-project/pull/102257


More information about the llvm-commits mailing list