@@ -83,8 +83,11 @@ impl<'a, 'tcx> TerminatorCodegenHelper<'tcx> {
8383 // Cross-funclet jump - need a trampoline
8484 debug_assert ! ( base:: wants_new_eh_instructions( fx. cx. tcx( ) . sess) ) ;
8585 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+ ) ;
8891 let mut trampoline_bx = Bx :: build ( fx. cx , trampoline_llbb) ;
8992 trampoline_bx. cleanup_ret ( self . funclet ( fx) . unwrap ( ) , Some ( lltarget) ) ;
9093 trampoline_llbb
@@ -1565,7 +1568,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
15651568 fn landing_pad_for_uncached ( & mut self , bb : mir:: BasicBlock ) -> Bx :: BasicBlock {
15661569 let llbb = self . llbb ( bb) ;
15671570 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:?}" ) ) ;
15691572 let mut cleanup_bx = Bx :: build ( self . cx , cleanup_bb) ;
15701573 let funclet = cleanup_bx. cleanup_pad ( None , & [ ] ) ;
15711574 cleanup_bx. br ( llbb) ;
@@ -1688,8 +1691,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
16881691 pub fn try_llbb ( & mut self , bb : mir:: BasicBlock ) -> Option < Bx :: BasicBlock > {
16891692 match self . cached_llbbs [ bb] {
16901693 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:?}" ) ) ;
16931695 self . cached_llbbs [ bb] = CachedLlbb :: Some ( llbb) ;
16941696 Some ( llbb)
16951697 }
0 commit comments