Commit 1a28f8d
authored
Fixes for switch statements on enums (iree-org#19140)
* Adds a missing `return`, to fix the GCC error flagged here:
https://github.com/iree-org/iree/pull/19099/files/ab2aa4c5e9487c5f51effdc0d123c2f369dc9c41#r1840709707
* Adds some assertions on these error-case returns which are reachable
but would only be reached if there is a bug in our program (as opposed
to being triggerable by user input).
* Drops some comments erroneously suggesting that it's GCC being
difficult. Here, GCC is right and Clang is having a false-negative bug:
llvm/llvm-project#115345
* Drops a redundant `return` after a `default: return`.
Signed-off-by: Benoit Jacob <[email protected]>1 parent 68c35d7 commit 1a28f8d
File tree
1 file changed
+3
-5
lines changed- compiler/src/iree/compiler/Codegen/Dialect/GPU/IR
1 file changed
+3
-5
lines changedLines changed: 3 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
| 305 | + | |
| 306 | + | |
305 | 307 | | |
306 | 308 | | |
307 | 309 | | |
| |||
667 | 669 | | |
668 | 670 | | |
669 | 671 | | |
| 672 | + | |
670 | 673 | | |
671 | 674 | | |
672 | 675 | | |
| |||
696 | 699 | | |
697 | 700 | | |
698 | 701 | | |
699 | | - | |
700 | 702 | | |
701 | 703 | | |
702 | 704 | | |
| |||
1281 | 1283 | | |
1282 | 1284 | | |
1283 | 1285 | | |
1284 | | - | |
1285 | 1286 | | |
1286 | 1287 | | |
1287 | 1288 | | |
| |||
1301 | 1302 | | |
1302 | 1303 | | |
1303 | 1304 | | |
1304 | | - | |
1305 | 1305 | | |
1306 | 1306 | | |
1307 | 1307 | | |
| |||
1356 | 1356 | | |
1357 | 1357 | | |
1358 | 1358 | | |
1359 | | - | |
1360 | 1359 | | |
1361 | 1360 | | |
1362 | 1361 | | |
| |||
1424 | 1423 | | |
1425 | 1424 | | |
1426 | 1425 | | |
1427 | | - | |
1428 | 1426 | | |
1429 | 1427 | | |
1430 | 1428 | | |
| |||
0 commit comments