craig.topper added inline comments.

================
Comment at: clang/utils/TableGen/RISCVVEmitter.cpp:700
+    for (auto Idx : CTypeOrder) {
+      if (Seen.count(Idx))
+        PrintFatalError(
----------------
You can use

```
if (!Seen.insert(Idx).second)
  PrintFatalError
```

This avoids walking the set twice.



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98388/new/

https://reviews.llvm.org/D98388

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to