Rename run_lto_pass_manager to optimize_fat and remove thin parameter

This commit is contained in:
bjorn3 2022-04-30 20:50:17 +02:00
parent 76d4862fdd
commit 336bb0afea
3 changed files with 18 additions and 20 deletions

View file

@ -41,6 +41,11 @@ pub trait WriteBackendMethods: 'static + Sized + Clone {
module: &ModuleCodegen<Self::Module>,
config: &ModuleConfig,
) -> Result<(), FatalError>;
fn optimize_fat(
cgcx: &CodegenContext<Self>,
llmod: &ModuleCodegen<Self::Module>,
config: &ModuleConfig,
) -> Result<(), FatalError>;
unsafe fn optimize_thin(
cgcx: &CodegenContext<Self>,
thin: &mut ThinModule<Self>,
@ -53,12 +58,6 @@ pub trait WriteBackendMethods: 'static + Sized + Clone {
) -> Result<CompiledModule, FatalError>;
fn prepare_thin(module: ModuleCodegen<Self::Module>) -> (String, Self::ThinBuffer);
fn serialize_module(module: ModuleCodegen<Self::Module>) -> (String, Self::ModuleBuffer);
fn run_lto_pass_manager(
cgcx: &CodegenContext<Self>,
llmod: &ModuleCodegen<Self::Module>,
config: &ModuleConfig,
thin: bool,
) -> Result<(), FatalError>;
}
pub trait ThinBufferMethods: Send + Sync {