@@ -109,7 +109,7 @@ fn prepare_lto(
109109                    . extend ( exported_symbols[ & cnum] . iter ( ) . filter_map ( symbol_filter) ) ; 
110110            } 
111111
112-             let  archive = ArchiveRO :: open ( & path) . expect ( "wanted an rlib" ) ; 
112+             let  archive = ArchiveRO :: open ( path) . expect ( "wanted an rlib" ) ; 
113113            let  obj_files = archive
114114                . iter ( ) 
115115                . filter_map ( |child| child. ok ( ) . and_then ( |c| c. name ( ) . map ( |name| ( name,  c) ) ) ) 
@@ -316,14 +316,14 @@ fn fat_lto(
316316                . generic_activity_with_arg ( "LLVM_fat_lto_link_module" ,  format ! ( "{:?}" ,  name) ) ; 
317317            info ! ( "linking {:?}" ,  name) ; 
318318            let  data = bc_decoded. data ( ) ; 
319-             linker. add ( & data) . map_err ( |( ) | { 
319+             linker. add ( data) . map_err ( |( ) | { 
320320                let  msg = format ! ( "failed to load bc of {:?}" ,  name) ; 
321-                 write:: llvm_err ( & diag_handler,  & msg) 
321+                 write:: llvm_err ( diag_handler,  & msg) 
322322            } ) ?; 
323323            serialized_bitcode. push ( bc_decoded) ; 
324324        } 
325325        drop ( linker) ; 
326-         save_temp_bitcode ( & cgcx,  & module,  "lto.input" ) ; 
326+         save_temp_bitcode ( cgcx,  & module,  "lto.input" ) ; 
327327
328328        // Fat LTO also suffers from the invalid DWARF issue similar to Thin LTO. 
329329        // Here we rewrite all `DICompileUnit` pointers if there is only one `DICompileUnit`. 
@@ -347,14 +347,14 @@ fn fat_lto(
347347                ptr as  * const  * const  libc:: c_char , 
348348                symbols_below_threshold. len ( )  as  libc:: size_t , 
349349            ) ; 
350-             save_temp_bitcode ( & cgcx,  & module,  "lto.after-restriction" ) ; 
350+             save_temp_bitcode ( cgcx,  & module,  "lto.after-restriction" ) ; 
351351        } 
352352
353353        if  cgcx. no_landing_pads  { 
354354            unsafe  { 
355355                llvm:: LLVMRustMarkAllFunctionsNounwind ( llmod) ; 
356356            } 
357-             save_temp_bitcode ( & cgcx,  & module,  "lto.after-nounwind" ) ; 
357+             save_temp_bitcode ( cgcx,  & module,  "lto.after-nounwind" ) ; 
358358        } 
359359    } 
360360
@@ -498,7 +498,7 @@ fn thin_lto(
498498            symbols_below_threshold. as_ptr ( ) , 
499499            symbols_below_threshold. len ( )  as  u32 , 
500500        ) 
501-         . ok_or_else ( || write:: llvm_err ( & diag_handler,  "failed to prepare thin LTO context" ) ) ?; 
501+         . ok_or_else ( || write:: llvm_err ( diag_handler,  "failed to prepare thin LTO context" ) ) ?; 
502502
503503        let  data = ThinData ( data) ; 
504504
@@ -572,7 +572,7 @@ fn thin_lto(
572572        if  let  Some ( path)  = key_map_path { 
573573            if  let  Err ( err)  = curr_key_map. save_to_file ( & path)  { 
574574                let  msg = format ! ( "Error while writing ThinLTO key data: {}" ,  err) ; 
575-                 return  Err ( write:: llvm_err ( & diag_handler,  & msg) ) ; 
575+                 return  Err ( write:: llvm_err ( diag_handler,  & msg) ) ; 
576576            } 
577577        } 
578578
@@ -744,8 +744,7 @@ pub unsafe fn optimize_thin_module(
744744    // crates but for locally codegened modules we may be able to reuse 
745745    // that LLVM Context and Module. 
746746    let  llcx = llvm:: LLVMRustContextCreate ( cgcx. fewer_names ) ; 
747-     let  llmod_raw =
748-         parse_module ( llcx,  & module_name,  thin_module. data ( ) ,  & diag_handler) ? as  * const  _ ; 
747+     let  llmod_raw = parse_module ( llcx,  module_name,  thin_module. data ( ) ,  & diag_handler) ? as  * const  _ ; 
749748    let  module = ModuleCodegen  { 
750749        module_llvm :  ModuleLlvm  {  llmod_raw,  llcx,  tm } , 
751750        name :  thin_module. name ( ) . to_string ( ) , 
@@ -754,7 +753,7 @@ pub unsafe fn optimize_thin_module(
754753    { 
755754        let  target = & * module. module_llvm . tm ; 
756755        let  llmod = module. module_llvm . llmod ( ) ; 
757-         save_temp_bitcode ( & cgcx,  & module,  "thin-lto-input" ) ; 
756+         save_temp_bitcode ( cgcx,  & module,  "thin-lto-input" ) ; 
758757
759758        // Before we do much else find the "main" `DICompileUnit` that we'll be 
760759        // using below. If we find more than one though then rustc has changed 
@@ -775,7 +774,7 @@ pub unsafe fn optimize_thin_module(
775774                . prof 
776775                . generic_activity_with_arg ( "LLVM_thin_lto_remove_landing_pads" ,  thin_module. name ( ) ) ; 
777776            llvm:: LLVMRustMarkAllFunctionsNounwind ( llmod) ; 
778-             save_temp_bitcode ( & cgcx,  & module,  "thin-lto-after-nounwind" ) ; 
777+             save_temp_bitcode ( cgcx,  & module,  "thin-lto-after-nounwind" ) ; 
779778        } 
780779
781780        // Up next comes the per-module local analyses that we do for Thin LTO. 
@@ -947,7 +946,7 @@ pub fn parse_module<'a>(
947946        llvm:: LLVMRustParseBitcodeForLTO ( cx,  data. as_ptr ( ) ,  data. len ( ) ,  name. as_ptr ( ) ) . ok_or_else ( 
948947            || { 
949948                let  msg = "failed to parse bitcode for LTO module" ; 
950-                 write:: llvm_err ( & diag_handler,  msg) 
949+                 write:: llvm_err ( diag_handler,  msg) 
951950            } , 
952951        ) 
953952    } 
0 commit comments