Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions clang/include/clang/CIR/Dialect/IR/CIROps.td
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@ def CIR_SwitchOp : CIR_Op<"switch", [

let arguments = (ins
CIR_IntType:$condition,
UnitAttr:$allEnumCasesCovered
UnitAttr:$all_enum_cases_covered
);

let regions = (region AnyRegion:$body);
Expand All @@ -1229,7 +1229,7 @@ def CIR_SwitchOp : CIR_Op<"switch", [

let assemblyFormat = [{
`(` $condition `:` qualified(type($condition)) `)`
(`allEnumCasesCovered` $allEnumCasesCovered^)?
(`all_enum_cases_covered` $all_enum_cases_covered^)?
$body
attr-dict
}];
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/CodeGen/switch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1282,7 +1282,7 @@ void testSwitchCoverAllCase(M m) {
break;
}
}
// CIR: cir.switch(%[[ARG:.*]] : !s32i) allEnumCasesCovered {
// CIR: cir.switch(%[[ARG:.*]] : !s32i) all_enum_cases_covered {

void testSwitchNotCoverAllCase(M m) {
switch (m) {
Expand Down
4 changes: 2 additions & 2 deletions clang/test/CIR/IR/switch.cir
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ cir.func @s0() {

// Pretends that this is lowered from a C file and was tagged with allEnumCasesCovered = true
cir.func @s1(%1 : !s32i) {
cir.switch (%1 : !s32i) allEnumCasesCovered {
cir.switch (%1 : !s32i) all_enum_cases_covered {
cir.case (default, []) {
cir.return
}
Expand All @@ -54,7 +54,7 @@ cir.func @s1(%1 : !s32i) {
} { }
cir.return
}
// CHECK: cir.switch(%[[ARG:.*]] : !s32i) allEnumCasesCovered {
// CHECK: cir.switch(%[[ARG:.*]] : !s32i) all_enum_cases_covered {
// CHECK-NEXT: cir.case(default, []) {
// CHECK-NEXT: cir.return
// CHECK-NEXT: }
Expand Down