================
@@ -1282,7 +1282,7 @@ void testSwitchCoverAllCase(M m) {
     break;
   }
 }
-// CIR: cir.switch(%[[ARG:.*]] : !s32i) allEnumCasesCovered {
+// CIR: cir.switch(%[[ARG:.*]] : !s32i) allEnumCasesCovered handling_enum {
----------------
bcardosolopes wrote:

I think that we should avoid encoding a property that can always be easily 
queried. CIR should be capturing enum info in the type system such that we can 
directly know if the condition type is of a enum type without hardcoding that 
info. SwitchOp should have an extra method "isConditionEnum()" which can return 
this information by looking at the condition. Have you explored anything along 
those lines?

Note all cases covered has a different tradeoff: it's expensive to compute.

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

Reply via email to