use driver::config::NoDebugInfo;
use driver::session::Session;
-use lib::llvm::{ContextRef, ModuleRef, ValueRef};
-use lib::llvm::{llvm, TargetData, TypeNames};
-use lib::llvm::mk_target_data;
+use llvm;
+use llvm::{ContextRef, ModuleRef, ValueRef};
+use llvm::{TargetData};
+use llvm::mk_target_data;
use metadata::common::LinkMeta;
use middle::resolve;
use middle::trans::adt;
use middle::trans::common::{ExternMap,tydesc_info,BuilderRef_res};
use middle::trans::debuginfo;
use middle::trans::monomorphize::MonoId;
-use middle::trans::type_::Type;
+use middle::trans::type_::{Type, TypeNames};
use middle::ty;
use util::sha2::Sha256;
use util::nodemap::{NodeMap, NodeSet, DefIdMap};
pub int_type: Type,
pub opaque_vec_type: Type,
pub builder: BuilderRef_res,
- /// 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,
+
+ /// Holds the LLVM values for closure IDs.
+ pub unboxed_closure_vals: RefCell<DefIdMap<ValueRef>>,
+
pub dbg_cx: Option<debuginfo::CrateDebugContext>,
pub eh_personality: RefCell<Option<ValueRef>>,
int_type: Type::from_ref(ptr::mut_null()),
opaque_vec_type: Type::from_ref(ptr::mut_null()),
builder: BuilderRef_res(llvm::LLVMCreateBuilderInContext(llcx)),
- uses_gc: false,
+ unboxed_closure_vals: RefCell::new(DefIdMap::new()),
dbg_cx: dbg_cx,
eh_personality: RefCell::new(None),
intrinsics: RefCell::new(HashMap::new()),
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