Auto merge of #122567 - erikdesjardins:noname, r= · rust-lang/rust@cc5ecf7 (original) (raw)
`@@ -83,8 +83,11 @@ impl<'a, 'tcx> TerminatorCodegenHelper<'tcx> {
`
83
83
`// Cross-funclet jump - need a trampoline
`
84
84
`debug_assert!(base::wants_new_eh_instructions(fx.cx.tcx().sess));
`
85
85
`debug!("llbb_with_cleanup: creating cleanup trampoline for {:?}", target);
`
86
``
`-
let name = &format!("{:?}cleanup_trampoline{:?}", self.bb, target);
`
87
``
`-
let trampoline_llbb = Bx::append_block(fx.cx, fx.llfn, name);
`
``
86
`+
let trampoline_llbb = Bx::append_block(
`
``
87
`+
fx.cx,
`
``
88
`+
fx.llfn,
`
``
89
`+
format_args!("{:?}cleanup_trampoline{:?}", self.bb, target),
`
``
90
`+
);
`
88
91
`let mut trampoline_bx = Bx::build(fx.cx, trampoline_llbb);
`
89
92
` trampoline_bx.cleanup_ret(self.funclet(fx).unwrap(), Some(lltarget));
`
90
93
` trampoline_llbb
`
`@@ -1565,7 +1568,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
`
1565
1568
`fn landing_pad_for_uncached(&mut self, bb: mir::BasicBlock) -> Bx::BasicBlock {
`
1566
1569
`let llbb = self.llbb(bb);
`
1567
1570
`if base::wants_new_eh_instructions(self.cx.sess()) {
`
1568
``
`-
let cleanup_bb = Bx::append_block(self.cx, self.llfn, &format!("funclet_{bb:?}"));
`
``
1571
`+
let cleanup_bb = Bx::append_block(self.cx, self.llfn, format_args!("funclet_{bb:?}"));
`
1569
1572
`let mut cleanup_bx = Bx::build(self.cx, cleanup_bb);
`
1570
1573
`let funclet = cleanup_bx.cleanup_pad(None, &[]);
`
1571
1574
` cleanup_bx.br(llbb);
`
`@@ -1688,8 +1691,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
`
1688
1691
`pub fn try_llbb(&mut self, bb: mir::BasicBlock) -> OptionBx::BasicBlock {
`
1689
1692
`match self.cached_llbbs[bb] {
`
1690
1693
`CachedLlbb::None => {
`
1691
``
`` -
// FIXME(eddyb) only name the block if fewer_names
is false
.
``
1692
``
`-
let llbb = Bx::append_block(self.cx, self.llfn, &format!("{bb:?}"));
`
``
1694
`+
let llbb = Bx::append_block(self.cx, self.llfn, format_args!("{bb:?}"));
`
1693
1695
`self.cached_llbbs[bb] = CachedLlbb::Some(llbb);
`
1694
1696
`Some(llbb)
`
1695
1697
`}
`