================
@@ -1196,36 +1196,90 @@ SmallVector<PrototypeDescriptor> 
parsePrototypes(StringRef Prototypes) {
   return PrototypeDescriptors;
 }
 
+#define STRINGIFY(NAME)                                                        
\
+  case NAME:                                                                   
\
+    OS << #NAME;                                                               
\
+    break;
+
+llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, enum PolicyScheme PS) {
+  switch (PS) {
+    STRINGIFY(SchemeNone)
+    STRINGIFY(HasPassthruOperand)
+    STRINGIFY(HasPolicyOperand)
+  }
+  return OS;
+}
+
+llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, enum RVVRequire Require) {
+  switch (Require) {
+    STRINGIFY(RVV_REQ_RV64)
+    STRINGIFY(RVV_REQ_Zvfhmin)
+    STRINGIFY(RVV_REQ_Xsfvcp)
+    STRINGIFY(RVV_REQ_Xsfvfnrclipxfqf)
+    STRINGIFY(RVV_REQ_Xsfvfwmaccqqq)
+    STRINGIFY(RVV_REQ_Xsfvqmaccdod)
+    STRINGIFY(RVV_REQ_Xsfvqmaccqoq)
+    STRINGIFY(RVV_REQ_Zvbb)
+    STRINGIFY(RVV_REQ_Zvbc)
+    STRINGIFY(RVV_REQ_Zvkb)
+    STRINGIFY(RVV_REQ_Zvkg)
+    STRINGIFY(RVV_REQ_Zvkned)
+    STRINGIFY(RVV_REQ_Zvknha)
+    STRINGIFY(RVV_REQ_Zvknhb)
+    STRINGIFY(RVV_REQ_Zvksed)
+    STRINGIFY(RVV_REQ_Zvksh)
+    STRINGIFY(RVV_REQ_Zvfbfwma)
+    STRINGIFY(RVV_REQ_Zvfbfmin)
+    STRINGIFY(RVV_REQ_Zvfh)
+    STRINGIFY(RVV_REQ_Experimental)
+  default:
----------------
topperc wrote:

This looks dangerous. How will we know if we forget to update this switch?

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

Reply via email to