@@ -200,14 +200,13 @@ fn get_bitcode_slice_from_object_data<'a>(
200
200
pub ( crate ) fn run_fat (
201
201
cgcx : & CodegenContext < LlvmCodegenBackend > ,
202
202
modules : Vec < FatLtoInput < LlvmCodegenBackend > > ,
203
- cached_modules : Vec < ( SerializedModule < ModuleBuffer > , WorkProduct ) > ,
204
203
) -> Result < ModuleCodegen < ModuleLlvm > , FatalError > {
205
204
let dcx = cgcx. create_dcx ( ) ;
206
205
let dcx = dcx. handle ( ) ;
207
206
let ( symbols_below_threshold, upstream_modules) = prepare_lto ( cgcx, dcx) ?;
208
207
let symbols_below_threshold =
209
208
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)
211
210
}
212
211
213
212
/// Performs thin LTO by performing necessary global analysis and returning two
@@ -245,7 +244,6 @@ fn fat_lto(
245
244
cgcx : & CodegenContext < LlvmCodegenBackend > ,
246
245
dcx : DiagCtxtHandle < ' _ > ,
247
246
modules : Vec < FatLtoInput < LlvmCodegenBackend > > ,
248
- cached_modules : Vec < ( SerializedModule < ModuleBuffer > , WorkProduct ) > ,
249
247
mut serialized_modules : Vec < ( SerializedModule < ModuleBuffer > , CString ) > ,
250
248
symbols_below_threshold : & [ * const libc:: c_char ] ,
251
249
) -> Result < ModuleCodegen < ModuleLlvm > , FatalError > {
@@ -258,21 +256,12 @@ fn fat_lto(
258
256
// modules that are serialized in-memory.
259
257
// * `in_memory` contains modules which are already parsed and in-memory,
260
258
// 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.
265
259
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
- } ) ) ;
270
260
for module in modules {
271
261
match module {
272
262
FatLtoInput :: InMemory ( m) => in_memory. push ( m) ,
273
263
FatLtoInput :: Serialized { name, buffer } => {
274
264
info ! ( "pushing serialized module {:?}" , name) ;
275
- let buffer = SerializedModule :: Local ( buffer) ;
276
265
serialized_modules. push ( ( buffer, CString :: new ( name) . unwrap ( ) ) ) ;
277
266
}
278
267
}
0 commit comments