]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_codegen_llvm/lib.rs
Rollup merge of #56416 - GuillaumeGomez:css-body, r=QuietMisdreavus
[rust.git] / src / librustc_codegen_llvm / lib.rs
index 8f14637d6f14034dae31b22aee169ae1a2a4e7a7..4f90cb793b6d22a107bba9963b8362ea20f14e57 100644 (file)
@@ -67,7 +67,7 @@
 extern crate tempfile;
 extern crate memmap;
 
-use rustc_codegen_ssa::interfaces::*;
+use rustc_codegen_ssa::traits::*;
 use rustc_codegen_ssa::back::write::{CodegenContext, ModuleConfig};
 use rustc_codegen_ssa::back::lto::{SerializedModule, LtoModuleCodegen, ThinModule};
 use rustc_codegen_ssa::CompiledModule;
@@ -127,6 +127,7 @@ mod back {
 mod type_;
 mod type_of;
 mod value;
+mod va_arg;
 
 #[derive(Clone)]
 pub struct LlvmCodegenBackend(());
@@ -165,17 +166,6 @@ fn target_cpu<'b>(&self, sess: &'b Session) -> &'b str {
     }
 }
 
-impl Clone for &'static mut llvm::TargetMachine {
-    fn clone(&self) -> Self {
-        // This method should never be called. It is put here because in
-        // rustc_codegen_ssa::back::write::CodegenContext, the TargetMachine is contained in a
-        // closure returned by a function under an Arc. The clone-deriving algorithm works when the
-        // struct contains the original LLVM TargetMachine type but not any more when supplied with
-        // a generic type. Hence this dummy Clone implementation.
-        panic!()
-    }
-}
-
 impl WriteBackendMethods for LlvmCodegenBackend {
     type Module = ModuleLlvm;
     type ModuleBuffer = back::lto::ModuleBuffer;
@@ -229,8 +219,8 @@ fn run_lto_pass_manager(
     }
 }
 
-unsafe impl<'a> Send for LlvmCodegenBackend {} // Llvm is on a per-thread basis
-unsafe impl<'a> Sync for LlvmCodegenBackend {}
+unsafe impl Send for LlvmCodegenBackend {} // Llvm is on a per-thread basis
+unsafe impl Sync for LlvmCodegenBackend {}
 
 impl LlvmCodegenBackend {
     pub fn new() -> Box<dyn CodegenBackend> {
@@ -238,7 +228,7 @@ pub fn new() -> Box<dyn CodegenBackend> {
     }
 }
 
-impl<'a> CodegenBackend for LlvmCodegenBackend {
+impl CodegenBackend for LlvmCodegenBackend {
     fn init(&self, sess: &Session) {
         llvm_util::init(sess); // Make sure llvm is inited
     }