]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/middle/trans/context.rs
auto merge of #15999 : Kimundi/rust/fix_folder, r=nikomatsakis
[rust.git] / src / librustc / middle / trans / context.rs
index be39d435ee4584e4a24b78eabb745f2abf414478..bb528790314da512fe2dae3a4234d58b3ad2a1a9 100644 (file)
@@ -121,10 +121,6 @@ pub struct CrateContext {
     /// Holds the LLVM values for closure IDs.
     pub unboxed_closure_vals: RefCell<DefIdMap<ValueRef>>,
 
-    /// Set when at least one function uses GC. Needed so that
-    /// decl_gc_metadata knows whether to link to the module metadata, which
-    /// is not emitted by LLVM's GC pass when no functions use GC.
-    pub uses_gc: bool,
     pub dbg_cx: Option<debuginfo::CrateDebugContext>,
 
     pub eh_personality: RefCell<Option<ValueRef>>,
@@ -230,7 +226,6 @@ pub fn new(name: &str,
                 opaque_vec_type: Type::from_ref(ptr::mut_null()),
                 builder: BuilderRef_res(llvm::LLVMCreateBuilderInContext(llcx)),
                 unboxed_closure_vals: RefCell::new(DefIdMap::new()),
-                uses_gc: false,
                 dbg_cx: dbg_cx,
                 eh_personality: RefCell::new(None),
                 intrinsics: RefCell::new(HashMap::new()),
@@ -425,6 +420,9 @@ macro_rules! mk_struct (
     ifn!("llvm.umul.with.overflow.i32" fn(t_i32, t_i32) -> mk_struct!{t_i32, i1});
     ifn!("llvm.umul.with.overflow.i64" fn(t_i64, t_i64) -> mk_struct!{t_i64, i1});
 
+    ifn!("llvm.lifetime.start" fn(t_i64,i8p) -> void);
+    ifn!("llvm.lifetime.end" fn(t_i64, i8p) -> void);
+
     ifn!("llvm.expect.i1" fn(i1, i1) -> i1);
 
     // Some intrinsics were introduced in later versions of LLVM, but they have