Skip to content

Commit 466b4ce

Browse files
committed
Rename catch_regions to handlers to act as general eh regions
1 parent a889246 commit 466b4ce

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
@@ -4342,14 +4342,14 @@ def CIR_TryOp : CIR_Op<"try",[
43424342

43434343
let regions = (region
43444344
AnyRegion:$try_region,
4345-
VariadicRegion<MinSizedRegion<1>>:$catch_regions
4345+
VariadicRegion<MinSizedRegion<1>>:$handlers
43464346
);
43474347

43484348
let assemblyFormat = [{
43494349
(`synthetic` $synthetic^)?
43504350
(`cleanup` $cleanup^)?
43514351
$try_region
4352-
custom<CatchRegions>($catch_regions, $catch_types)
4352+
custom<CatchRegions>($handlers, $catch_types)
43534353
attr-dict
43544354
}];
43554355

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

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

28962896
// TODO(CIR): If we know a target function never throws a specific type, we
28972897
// can remove the catch handler.
2898-
for (mlir::Region &region : this->getCatchRegions())
2899-
regions.push_back(mlir::RegionSuccessor(&region));
2898+
for (mlir::Region &handler : this->getHandlers())
2899+
regions.push_back(mlir::RegionSuccessor(&handler));
29002900
}
29012901

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

0 commit comments

Comments
 (0)