From 35cdb28c846dd327801bbcfd274385e3e353b21a Mon Sep 17 00:00:00 2001 From: Jan-Mirko Otter Date: Sun, 7 May 2023 11:02:17 +0200 Subject: [PATCH] add comment --- compiler/rustc_codegen_ssa/src/mir/block.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/compiler/rustc_codegen_ssa/src/mir/block.rs b/compiler/rustc_codegen_ssa/src/mir/block.rs index e0cb26d3ba8..b0a9aec3694 100644 --- a/compiler/rustc_codegen_ssa/src/mir/block.rs +++ b/compiler/rustc_codegen_ssa/src/mir/block.rs @@ -1587,6 +1587,15 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { // } catch (...) { // bar(); // } + // + // which creates an IR snippet like + // + // cs_terminate: + // %cs = catchswitch within none [%cp_terminate] unwind to caller + // cp_terminate: + // %cp = catchpad within %cs [null, i32 64, null] + // ... + llbb = Bx::append_block(self.cx, self.llfn, "cs_terminate"); let cp_llbb = Bx::append_block(self.cx, self.llfn, "cp_terminate");