about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/lib.rs
diff options
context:
space:
mode:
authorDenis Merigoux <denis.merigoux@gmail.com>2018-09-06 16:04:20 -0700
committerEduard-Mihai Burtescu <edy.burt@gmail.com>2018-11-16 14:11:59 +0200
commit4787b7cac9da73a2c1c9cb2683e7f904a01f563c (patch)
tree0064102c97d347aa09fdf5315b8c943d00e08de5 /src/librustc_codegen_llvm/lib.rs
parenta1d0d4f9439640d8694ebb7fa905f4e328d5febd (diff)
downloadrust-4787b7cac9da73a2c1c9cb2683e7f904a01f563c.tar.gz
rust-4787b7cac9da73a2c1c9cb2683e7f904a01f563c.zip
Removed phantomdata no longer necessary
Because CodegenContext doesn't implement Backend anymore
Diffstat (limited to 'src/librustc_codegen_llvm/lib.rs')
-rw-r--r--src/librustc_codegen_llvm/lib.rs15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/librustc_codegen_llvm/lib.rs b/src/librustc_codegen_llvm/lib.rs
index f8f50326f0e..43942b0db85 100644
--- a/src/librustc_codegen_llvm/lib.rs
+++ b/src/librustc_codegen_llvm/lib.rs
@@ -72,7 +72,6 @@ use back::bytecode::RLIB_BYTECODE_EXTENSION;
 pub use llvm_util::target_features;
 use std::any::Any;
 use std::sync::mpsc;
-use std::marker::PhantomData;
 use rustc_data_structures::sync::Lrc;
 
 use rustc::dep_graph::DepGraph;
@@ -274,7 +273,7 @@ struct ModuleCodegen {
     /// as the crate name and disambiguator.
     /// We currently generate these names via CodegenUnit::build_cgu_name().
     name: String,
-    module_llvm: ModuleLlvm<'static>,
+    module_llvm: ModuleLlvm,
     kind: ModuleKind,
 }
 
@@ -316,17 +315,16 @@ impl ModuleCodegen {
     }
 }
 
-struct ModuleLlvm<'ll> {
+struct ModuleLlvm {
     llcx: &'static mut llvm::Context,
     llmod_raw: *const llvm::Module,
     tm: &'static mut llvm::TargetMachine,
-    phantom: PhantomData<&'ll ()>
 }
 
-unsafe impl Send for ModuleLlvm<'ll> { }
-unsafe impl Sync for ModuleLlvm<'ll> { }
+unsafe impl Send for ModuleLlvm { }
+unsafe impl Sync for ModuleLlvm { }
 
-impl ModuleLlvm<'ll> {
+impl ModuleLlvm {
     fn new(sess: &Session, mod_name: &str) -> Self {
         unsafe {
             let llcx = llvm::LLVMRustContextCreate(sess.fewer_names());
@@ -336,7 +334,6 @@ impl ModuleLlvm<'ll> {
                 llmod_raw,
                 llcx,
                 tm: create_target_machine(sess, false),
-                phantom: PhantomData
             }
         }
     }
@@ -348,7 +345,7 @@ impl ModuleLlvm<'ll> {
     }
 }
 
-impl Drop for ModuleLlvm<'ll> {
+impl Drop for ModuleLlvm {
     fn drop(&mut self) {
         unsafe {
             llvm::LLVMContextDispose(&mut *(self.llcx as *mut _));