-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
ClangIRAnything related to the ClangIR projectAnything related to the ClangIR project
Description
Overview
Upstream support for switch statements and the cir.switch and cir.case operations.
Suggested minimal test case
int f(int a) {
switch (a) {
case 0: return 10;
case 1: return 20;
default: return 30;
}
}
Note: The cir.break statement will be upstreamed as part of #132490. Please wait for that to avoid duplicate work. The upstreaming of switch statements without break statements can be handled independently.
Existing incubator tests
clang/test/CIR/CodeGen/switch.cpp
Metadata
Metadata
Assignees
Labels
ClangIRAnything related to the ClangIR projectAnything related to the ClangIR project