@@ -200,14 +200,13 @@ fn get_bitcode_slice_from_object_data<'a>(
200200pub ( crate ) fn run_fat (
201201 cgcx : & CodegenContext < LlvmCodegenBackend > ,
202202 modules : Vec < FatLtoInput < LlvmCodegenBackend > > ,
203- cached_modules : Vec < ( SerializedModule < ModuleBuffer > , WorkProduct ) > ,
204203) -> Result < ModuleCodegen < ModuleLlvm > , FatalError > {
205204 let dcx = cgcx. create_dcx ( ) ;
206205 let dcx = dcx. handle ( ) ;
207206 let ( symbols_below_threshold, upstream_modules) = prepare_lto ( cgcx, dcx) ?;
208207 let symbols_below_threshold =
209208 symbols_below_threshold. iter ( ) . map ( |c| c. as_ptr ( ) ) . collect :: < Vec < _ > > ( ) ;
210- fat_lto ( cgcx, dcx, modules, cached_modules , upstream_modules, & symbols_below_threshold)
209+ fat_lto ( cgcx, dcx, modules, upstream_modules, & symbols_below_threshold)
211210}
212211
213212/// Performs thin LTO by performing necessary global analysis and returning two
@@ -245,7 +244,6 @@ fn fat_lto(
245244 cgcx : & CodegenContext < LlvmCodegenBackend > ,
246245 dcx : DiagCtxtHandle < ' _ > ,
247246 modules : Vec < FatLtoInput < LlvmCodegenBackend > > ,
248- cached_modules : Vec < ( SerializedModule < ModuleBuffer > , WorkProduct ) > ,
249247 mut serialized_modules : Vec < ( SerializedModule < ModuleBuffer > , CString ) > ,
250248 symbols_below_threshold : & [ * const libc:: c_char ] ,
251249) -> Result < ModuleCodegen < ModuleLlvm > , FatalError > {
@@ -258,21 +256,12 @@ fn fat_lto(
258256 // modules that are serialized in-memory.
259257 // * `in_memory` contains modules which are already parsed and in-memory,
260258 // such as from multi-CGU builds.
261- //
262- // All of `cached_modules` (cached from previous incremental builds) can
263- // immediately go onto the `serialized_modules` modules list and then we can
264- // split the `modules` array into these two lists.
265259 let mut in_memory = Vec :: new ( ) ;
266- serialized_modules. extend ( cached_modules. into_iter ( ) . map ( |( buffer, wp) | {
267- info ! ( "pushing cached module {:?}" , wp. cgu_name) ;
268- ( buffer, CString :: new ( wp. cgu_name ) . unwrap ( ) )
269- } ) ) ;
270260 for module in modules {
271261 match module {
272262 FatLtoInput :: InMemory ( m) => in_memory. push ( m) ,
273263 FatLtoInput :: Serialized { name, buffer } => {
274264 info ! ( "pushing serialized module {:?}" , name) ;
275- let buffer = SerializedModule :: Local ( buffer) ;
276265 serialized_modules. push ( ( buffer, CString :: new ( name) . unwrap ( ) ) ) ;
277266 }
278267 }
0 commit comments