pub struct LlvmCodegenBackend(());
impl ExtraBackendMethods for LlvmCodegenBackend {
- fn new_metadata(&self, tcx: TyCtxt<'_, '_, '_>, mod_name: &str) -> ModuleLlvm {
+ fn new_metadata(&self, tcx: TyCtxt<'_, '_>, mod_name: &str) -> ModuleLlvm {
ModuleLlvm::new_metadata(tcx, mod_name)
}
fn write_compressed_metadata<'b, 'gcx>(
&self,
- tcx: TyCtxt<'gcx, 'gcx, 'gcx>,
+ tcx: TyCtxt<'gcx, 'gcx>,
metadata: &EncodedMetadata,
- llvm_module: &mut ModuleLlvm
+ llvm_module: &mut ModuleLlvm,
) {
base::write_compressed_metadata(tcx, metadata, llvm_module)
}
fn codegen_allocator<'b, 'gcx>(
&self,
- tcx: TyCtxt<'gcx, 'gcx, 'gcx>,
+ tcx: TyCtxt<'gcx, 'gcx>,
mods: &mut ModuleLlvm,
- kind: AllocatorKind
+ kind: AllocatorKind,
) {
unsafe { allocator::codegen(tcx, mods, kind) }
}
fn compile_codegen_unit<'a, 'tcx: 'a>(
&self,
- tcx: TyCtxt<'tcx, 'tcx, 'tcx>,
+ tcx: TyCtxt<'tcx, 'tcx>,
cgu_name: InternedString,
) {
base::compile_codegen_unit(tcx, cgu_name);
fn codegen_crate<'b, 'tcx>(
&self,
- tcx: TyCtxt<'tcx, 'tcx, 'tcx>,
+ tcx: TyCtxt<'tcx, 'tcx>,
metadata: EncodedMetadata,
need_metadata_module: bool,
- rx: mpsc::Receiver<Box<dyn Any + Send>>
+ rx: mpsc::Receiver<Box<dyn Any + Send>>,
) -> Box<dyn Any> {
box rustc_codegen_ssa::base::codegen_crate(
LlvmCodegenBackend(()), tcx, metadata, need_metadata_module, rx)
unsafe impl Sync for ModuleLlvm { }
impl ModuleLlvm {
- fn new(tcx: TyCtxt<'_, '_, '_>, mod_name: &str) -> Self {
+ fn new(tcx: TyCtxt<'_, '_>, mod_name: &str) -> Self {
unsafe {
let llcx = llvm::LLVMRustContextCreate(tcx.sess.fewer_names());
let llmod_raw = context::create_module(tcx, llcx, mod_name) as *const _;
}
}
- fn new_metadata(tcx: TyCtxt<'_, '_, '_>, mod_name: &str) -> Self {
+ fn new_metadata(tcx: TyCtxt<'_, '_>, mod_name: &str) -> Self {
unsafe {
let llcx = llvm::LLVMRustContextCreate(tcx.sess.fewer_names());
let llmod_raw = context::create_module(tcx, llcx, mod_name) as *const _;