[llvm] [LLVM][TableGen] Change CodeEmitterGen to use const RecordKeeper (PR #109025)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 18 05:07:05 PDT 2024


================
@@ -448,15 +452,13 @@ void CodeEmitterGen::emitInstructionBaseValues(
 void CodeEmitterGen::emitCaseMap(
     raw_ostream &o,
     const std::map<std::string, std::vector<std::string>> &CaseMap) {
-  std::map<std::string, std::vector<std::string>>::const_iterator IE, EE;
-  for (IE = CaseMap.begin(), EE = CaseMap.end(); IE != EE; ++IE) {
-    const std::string &Case = IE->first;
-    const std::vector<std::string> &InstList = IE->second;
-
-    for (int i = 0, N = InstList.size(); i < N; i++) {
-      if (i)
+  for (const auto &[Case, InstList] : CaseMap) {
+    bool First = false;
----------------
jurahul wrote:

Fixed now.

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


More information about the llvm-commits mailing list