Trait rustc_codegen_llvm::ExtraBackendMethods[−][src]

pub trait ExtraBackendMethods: CodegenBackend + WriteBackendMethods + Send + Sync {
    fn new_metadata(&self, sess: TyCtxt<'_>, mod_name: &str) -> Self::Module;
fn write_compressed_metadata(
        &self,
        tcx: TyCtxt<'tcx>,
        metadata: &EncodedMetadata,
        llvm_module: &mut Self::Module
    );
fn codegen_allocator(
        &self,
        tcx: TyCtxt<'tcx>,
        module_llvm: &mut Self::Module,
        module_name: &str,
        kind: AllocatorKind,
        has_alloc_error_handler: bool
    );
fn compile_codegen_unit(
        &self,
        tcx: TyCtxt<'_>,
        cgu_name: Symbol
    ) -> (ModuleCodegen<Self::Module>, u64);
fn target_machine_factory(
        &self,
        sess: &Session,
        opt_level: OptLevel
    ) -> Arc<dyn Fn(TargetMachineFactoryConfig) + Send + Sync + 'static>;
fn target_cpu(&self, sess: &'b Session) -> &'b str;
fn tune_cpu(&self, sess: &'b Session) -> Option<&'b str>; fn spawn_thread<F, T>(_time_trace: bool, f: F) -> JoinHandle<T>
    where
        F: FnOnce() -> T + 'static + Send,
        T: 'static + Send
, { ... }
fn spawn_named_thread<F, T>(
        _time_trace: bool,
        name: String,
        f: F
    ) -> Result<JoinHandle<T>, Error>
    where
        F: FnOnce() -> T + 'static + Send,
        T: 'static + Send
, { ... } }

Required methods

This generates the codegen unit and returns it along with a u64 giving an estimate of the unit’s processing cost.

Provided methods

Implementors