================
@@ -1047,6 +1047,11 @@ def CIR_SwitchOp : CIR_Op<"switch", [
     conditionally executing multiple regions of code. The operand to an switch
     is an integral condition value.
 
+    Besides accepting an int type of condition and regions of cir code, it 
also accepts 
+    a boolean allEnumCasesCovered indicating if all cases of an enum is 
covered. Note that 
+    having a default CaseOp inside the switch doesn't imply 
allEnumCasesCovered, the OG AST switch
+    needs to have each case spelled out.
----------------
xlauko wrote:

```suggestion
    Besides taking an integer condition and CIR regions, it also accepts an
    `allEnumCasesCovered` attribute indicating whether all enum cases are 
    handled by the operation. Note that the presence of a default CaseOp does 
    not imply `allEnumCasesCovered. The original AST switch must explicitly 
list 
    every enum case.
```

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

Reply via email to