Skip to content

Commit 01e63fb

Browse files
committed
Rename catch_regions to handlers to act as general eh regions
1 parent 5369090 commit 01e63fb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4371,14 +4371,14 @@ def CIR_TryOp : CIR_Op<"try",[
43714371

43724372
let regions = (region
43734373
AnyRegion:$try_region,
4374-
VariadicRegion<MinSizedRegion<1>>:$catch_regions
4374+
VariadicRegion<MinSizedRegion<1>>:$handlers
43754375
);
43764376

43774377
let assemblyFormat = [{
43784378
(`synthetic` $synthetic^)?
43794379
(`cleanup` $cleanup^)?
43804380
$try_region
4381-
custom<CatchRegions>($catch_regions, $catch_types)
4381+
custom<CatchRegions>($handlers, $catch_types)
43824382
attr-dict
43834383
}];
43844384

clang/lib/CIR/Dialect/IR/CIRDialect.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2931,8 +2931,8 @@ void cir::TryOp::getSuccessorRegions(
29312931

29322932
// TODO(CIR): If we know a target function never throws a specific type, we
29332933
// can remove the catch handler.
2934-
for (mlir::Region &region : this->getCatchRegions())
2935-
regions.push_back(mlir::RegionSuccessor(&region));
2934+
for (mlir::Region &handler : this->getHandlers())
2935+
regions.push_back(mlir::RegionSuccessor(&handler));
29362936
}
29372937

29382938
static void printCatchRegions(mlir::OpAsmPrinter &printer, cir::TryOp op,

0 commit comments

Comments
 (0)