diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2022-01-24 13:50:12 +0100 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2022-01-24 14:10:05 +0100 |
| commit | 7a164509d3ed0b7dfc5f79b2e0053a4abef5fb1b (patch) | |
| tree | d1a17f132d7e118a9df1c9c1cbfade975f9821cd /compiler/rustc_codegen_ssa/src/mir | |
| parent | e9646fa76b4876cbfe50fd89d3f179c27685f874 (diff) | |
| download | rust-7a164509d3ed0b7dfc5f79b2e0053a4abef5fb1b.tar.gz rust-7a164509d3ed0b7dfc5f79b2e0053a4abef5fb1b.zip | |
Merge add_handler into catch_switch
Some codegen backends may require all handlers to be immediately known
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/mir')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/block.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/block.rs b/compiler/rustc_codegen_ssa/src/mir/block.rs index b1a76b80002..ee7ca7f6e46 100644 --- a/compiler/rustc_codegen_ssa/src/mir/block.rs +++ b/compiler/rustc_codegen_ssa/src/mir/block.rs @@ -1346,8 +1346,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { let mut cp_bx = self.new_block(&format!("cp_funclet{:?}", bb)); ret_llbb = cs_bx.llbb(); - let cs = cs_bx.catch_switch(None, None, 1); - cs_bx.add_handler(cs, cp_bx.llbb()); + let cs = cs_bx.catch_switch(None, None, &[cp_bx.llbb()]); // The "null" here is actually a RTTI type descriptor for the // C++ personality function, but `catch (...)` has no type so |
