@@ -314,7 +314,6 @@ fn fat_lto(
314314}
315315}
316316} ;
317- let mut serialized_bitcode = Vec :: new ( ) ;
318317{
319318let ( llcx, llmod) = {
320319let llvm = & module. module_llvm ;
@@ -342,9 +341,7 @@ fn fat_lto(
342341 serialized_modules. sort_by ( |module1, module2| module1. 1 . cmp ( & module2. 1 ) ) ;
343342
344343// For all serialized bitcode files we parse them and link them in as we did
345- // above, this is all mostly handled in C++. Like above, though, we don't
346- // know much about the memory management here so we err on the side of being
347- // save and persist everything with the original module.
344+ // above, this is all mostly handled in C++.
348345let mut linker = Linker :: new ( llmod) ;
349346for ( bc_decoded, name) in serialized_modules {
350347let _timer = cgcx
@@ -355,7 +352,6 @@ fn fat_lto(
355352info ! ( "linking {:?}" , name) ;
356353let data = bc_decoded. data ( ) ;
357354 linker. add ( data) . map_err ( |( ) | write:: llvm_err ( dcx, LlvmError :: LoadBitcode { name } ) ) ?;
358- serialized_bitcode. push ( bc_decoded) ;
359355}
360356drop ( linker) ;
361357save_temp_bitcode ( cgcx, & module, "lto.input" ) ;
@@ -372,7 +368,7 @@ fn fat_lto(
372368}
373369}
374370
375- Ok ( LtoModuleCodegen :: Fat { module, _serialized_bitcode : serialized_bitcode } )
371+ Ok ( LtoModuleCodegen :: Fat ( module) )
376372}
377373
378374pub ( crate ) struct Linker < ' a > ( & ' a mut llvm:: Linker < ' a > ) ;
0 commit comments