Mark back::lto::optimize_thin_module and back::write::codegen` functions as safe
This commit is contained in:
parent
7f2f0d2ec1
commit
0bdf0726cf
3 changed files with 4 additions and 4 deletions
|
|
@ -589,7 +589,7 @@ fn thin_lto(
|
|||
Ok((opt_jobs, copy_jobs))
|
||||
}
|
||||
|
||||
pub unsafe fn optimize_thin_module(
|
||||
pub fn optimize_thin_module(
|
||||
thin_module: ThinModule<GccCodegenBackend>,
|
||||
_cgcx: &CodegenContext<GccCodegenBackend>,
|
||||
) -> Result<ModuleCodegen<GccContext>, FatalError> {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ use crate::base::add_pic_option;
|
|||
use crate::errors::CopyBitcode;
|
||||
use crate::{GccCodegenBackend, GccContext};
|
||||
|
||||
pub(crate) unsafe fn codegen(
|
||||
pub(crate) fn codegen(
|
||||
cgcx: &CodegenContext<GccCodegenBackend>,
|
||||
dcx: DiagCtxtHandle<'_>,
|
||||
module: ModuleCodegen<GccContext>,
|
||||
|
|
|
|||
|
|
@ -413,7 +413,7 @@ impl WriteBackendMethods for GccCodegenBackend {
|
|||
cgcx: &CodegenContext<Self>,
|
||||
thin: ThinModule<Self>,
|
||||
) -> Result<ModuleCodegen<Self::Module>, FatalError> {
|
||||
unsafe { back::lto::optimize_thin_module(thin, cgcx) }
|
||||
back::lto::optimize_thin_module(thin, cgcx)
|
||||
}
|
||||
|
||||
unsafe fn codegen(
|
||||
|
|
@ -422,7 +422,7 @@ impl WriteBackendMethods for GccCodegenBackend {
|
|||
module: ModuleCodegen<Self::Module>,
|
||||
config: &ModuleConfig,
|
||||
) -> Result<CompiledModule, FatalError> {
|
||||
unsafe { back::write::codegen(cgcx, dcx, module, config) }
|
||||
back::write::codegen(cgcx, dcx, module, config)
|
||||
}
|
||||
|
||||
fn prepare_thin(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue