================
@@ -433,6 +427,29 @@ static void emitOptionParser(const RecordKeeper &Records, 
raw_ostream &OS) {
   }
   OS << "\n};\n\n";
 
+  // Rarely set fields, in OptTable::InfoExtra order. Options with equal values
+  // share a row; row 0 is all zero.
+  OS << "constexpr llvm::opt::OptTable::InfoExtra OptionInfoExtrasTable[] = "
+        "{\n  {0, 0, 0, 0, 0},\n";
+  std::map<std::array<unsigned, 5>, unsigned> ExtraRows;
----------------
MaskRay wrote:

Switched to
```
+  using ExtraRowT =
+      std::tuple<unsigned, unsigned, unsigned, unsigned, unsigned>;
+  DenseMap<ExtraRowT, unsigned> ExtraRows;
```

std::tuple is used because there is no `DenseMapInfo<std::array<...>>`.

https://github.com/llvm/llvm-project/pull/224807
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to