@@ -175,10 +175,37 @@ fn compile_fn<'tcx>(
175175 ) ;
176176 } ) ;
177177
178+ #[ cfg( any( ) ) ] // This is never true
179+ let _clif_guard = {
180+ use std:: fmt:: Write ;
181+
182+ let func_clone = context. func . clone ( ) ;
183+ let clif_comments_clone = clif_comments. clone ( ) ;
184+ let mut clif = String :: new ( ) ;
185+ for flag in module. isa ( ) . flags ( ) . iter ( ) {
186+ writeln ! ( clif, "set {}" , flag) . unwrap ( ) ;
187+ }
188+ write ! ( clif, "target {}" , module. isa( ) . triple( ) . architecture. to_string( ) ) . unwrap ( ) ;
189+ for isa_flag in module. isa ( ) . isa_flags ( ) . iter ( ) {
190+ write ! ( clif, " {}" , isa_flag) . unwrap ( ) ;
191+ }
192+ writeln ! ( clif, "\n " ) . unwrap ( ) ;
193+ crate :: PrintOnPanic ( move || {
194+ let mut clif = clif. clone ( ) ;
195+ :: cranelift_codegen:: write:: decorate_function (
196+ & mut & clif_comments_clone,
197+ & mut clif,
198+ & func_clone,
199+ )
200+ . unwrap ( ) ;
201+ clif
202+ } )
203+ } ;
204+
178205 // Define function
179206 tcx. sess . time ( "define function" , || {
180207 context. want_disasm = crate :: pretty_clif:: should_write_ir ( tcx) ;
181- module. define_function ( func_id, context) . unwrap ( )
208+ module. define_function ( func_id, context) . unwrap ( ) ;
182209 } ) ;
183210
184211 // Write optimized function to file for debugging
0 commit comments