================
@@ -3727,12 +3734,26 @@ static void GenerateHasAttrSpellingStringSwitch(
       }
     }
 
-    std::string TestStr = !Test.empty()
-                              ? Test + " ? " + itostr(Version) + " : 0"
-                              : itostr(Version);
-    if (Scope.empty() || Scope == Spelling.nameSpace())
-      OS << "    .Case(\"" << Spelling.name() << "\", " << TestStr << ")\n";
+    std::string TestStr =
+        !Test.empty() ? '(' + Test + " ? " + itostr(Version) + " : 0" + ')'
+                      : '(' + itostr(Version) + ')';
+
+    if (Scope.empty() || Scope == Spelling.nameSpace()) {
+      if (TestStringMap.contains(Spelling.name())) {
+        TestStringMap[Spelling.name()] += " || " + TestStr;
+      } else {
+        TestStringMap[Spelling.name()] = TestStr;
+      }
+    }
+  }
+
+  // Create the actual string switch statement after all the attributes have
+  // been parsed
----------------
Mr-Anyone wrote:

done.

https://github.com/llvm/llvm-project/pull/140828
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to