Skip to content

Commit 767aed9

Browse files
committed
Address code review comments
1 parent 89ac10b commit 767aed9

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

clang/include/clang/CIR/Dialect/IR/CIROps.td

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -902,12 +902,12 @@ def CIR_ContinueOp : CIR_Op<"continue", [Terminator]> {
902902
// Resume
903903
//===----------------------------------------------------------------------===//
904904

905-
def CIR_SCFResumeOp : CIR_Op<"scf.resume", [
906-
ReturnLike, Terminator
905+
def CIR_ResumeOp : CIR_Op<"resume", [
906+
ReturnLike, Terminator, HasParent<"cir::TryOp">
907907
]> {
908908
let summary = "Resumes execution after not catching exceptions";
909909
let description = [{
910-
The `cir.scf.resume` operation handles an uncaught exception scenario.
910+
The `cir.resume` operation handles an uncaught exception scenario.
911911

912912
Used as the terminator of a `CatchUnwind` region of `cir.try`, where it
913913
does not receive any arguments (implied from the `cir.try` scope).
@@ -919,7 +919,7 @@ def CIR_SCFResumeOp : CIR_Op<"scf.resume", [
919919
cir.try {
920920
cir.yield
921921
} unwind {
922-
cir.scf.resume
922+
cir.resume
923923
}
924924
```
925925
}];

clang/test/CIR/IR/try-catch.cir

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,23 +81,23 @@ cir.func dso_local @empty_try_block_with_catch_ist() {
8181
// CHECK: cir.return
8282
// CHECK: }
8383

84-
cir.func dso_local @empty_try_block_with_catch_unwind_contains_resume() {
84+
cir.func @empty_try_block_with_catch_unwind_contains_resume() {
8585
cir.scope {
8686
cir.try {
8787
cir.yield
8888
} unwind {
89-
cir.scf.resume
89+
cir.resume
9090
}
9191
}
9292
cir.return
9393
}
9494

95-
// CHECK: cir.func dso_local @empty_try_block_with_catch_unwind_contains_resume() {
95+
// CHECK: cir.func @empty_try_block_with_catch_unwind_contains_resume() {
9696
// CHECK: cir.scope {
9797
// CHECK: cir.try {
9898
// CHECK: cir.yield
9999
// CHECK: } unwind {
100-
// CHECK: cir.scf.resume
100+
// CHECK: cir.resume
101101
// CHECK: }
102102
// CHECK: }
103103
// CHECK: cir.return

0 commit comments

Comments
 (0)