Let LtoModuleCodegen::optimize take self by value
This commit is contained in:
parent
336bb0afea
commit
ee94ff254a
6 changed files with 13 additions and 14 deletions
|
@ -353,7 +353,7 @@ fn fat_lto(
|
|||
}
|
||||
}
|
||||
|
||||
Ok(LtoModuleCodegen::Fat { module: Some(module), _serialized_bitcode: serialized_bitcode })
|
||||
Ok(LtoModuleCodegen::Fat { module, _serialized_bitcode: serialized_bitcode })
|
||||
}
|
||||
|
||||
crate struct Linker<'a>(&'a mut llvm::Linker<'a>);
|
||||
|
@ -726,7 +726,7 @@ impl Drop for ThinBuffer {
|
|||
}
|
||||
|
||||
pub unsafe fn optimize_thin_module(
|
||||
thin_module: &mut ThinModule<LlvmCodegenBackend>,
|
||||
thin_module: ThinModule<LlvmCodegenBackend>,
|
||||
cgcx: &CodegenContext<LlvmCodegenBackend>,
|
||||
) -> Result<ModuleCodegen<ModuleLlvm>, FatalError> {
|
||||
let diag_handler = cgcx.create_diag_handler();
|
||||
|
|
|
@ -220,7 +220,7 @@ impl WriteBackendMethods for LlvmCodegenBackend {
|
|||
}
|
||||
unsafe fn optimize_thin(
|
||||
cgcx: &CodegenContext<Self>,
|
||||
thin: &mut ThinModule<Self>,
|
||||
thin: ThinModule<Self>,
|
||||
) -> Result<ModuleCodegen<Self::Module>, FatalError> {
|
||||
back::lto::optimize_thin_module(thin, cgcx)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue