[llvm] [TableGen] Emit better error message for duplicate Subtarget features. (PR #102090)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 6 09:44:48 PDT 2024


================
@@ -259,8 +259,8 @@ unsigned SubtargetEmitter::FeatureKeyValues(
 
   llvm::sort(FeatureList, LessRecordFieldName());
 
-  // Check that there are no duplicate keys
-  std::set<StringRef> UniqueKeys;
+  // Check that there are no duplicate keys.
+  DenseMap<StringRef, const Record *> UniqueKeys;
----------------
s-barannikov wrote:

```suggestion
  // Check that there are no duplicate features.
  DenseMap<StringRef, const Record *> UniqueFeatures;
```

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


More information about the llvm-commits mailing list