@@ -47,7 +47,7 @@ use abi::Abi;
4747/// There is one `CodegenCx` per compilation unit. Each one has its own LLVM
4848/// `llvm::Context` so that several compilation units may be optimized in parallel.
4949/// All other LLVM data structures in the `CodegenCx` are tied to that `llvm::Context`.
50- pub struct CodegenCx < ' ll , ' tcx : ' ll , V = & ' ll Value > {
50+ pub struct CodegenCx < ' ll , ' tcx : ' ll > {
5151 pub tcx : TyCtxt < ' ll , ' tcx , ' tcx > ,
5252 pub check_overflow : bool ,
5353 pub use_dll_storage_attrs : bool ,
@@ -59,11 +59,11 @@ pub struct CodegenCx<'ll, 'tcx: 'll, V = &'ll Value> {
5959 pub codegen_unit : Arc < CodegenUnit < ' tcx > > ,
6060
6161 /// Cache instances of monomorphic and polymorphic items
62- pub instances : RefCell < FxHashMap < Instance < ' tcx > , V > > ,
62+ pub instances : RefCell < FxHashMap < Instance < ' tcx > , & ' ll Value > > ,
6363 /// Cache generated vtables
64- pub vtables : RefCell < FxHashMap < ( Ty < ' tcx > , ty:: PolyExistentialTraitRef < ' tcx > ) , V > > ,
64+ pub vtables : RefCell < FxHashMap < ( Ty < ' tcx > , ty:: PolyExistentialTraitRef < ' tcx > ) , & ' ll Value > > ,
6565 /// Cache of constant strings,
66- pub const_cstr_cache : RefCell < FxHashMap < LocalInternedString , V > > ,
66+ pub const_cstr_cache : RefCell < FxHashMap < LocalInternedString , & ' ll Value > > ,
6767
6868 /// Reverse-direction for const ptrs cast from globals.
6969 /// Key is a Value holding a *T,
@@ -73,20 +73,20 @@ pub struct CodegenCx<'ll, 'tcx: 'll, V = &'ll Value> {
7373 /// when we ptrcast, and we have to ptrcast during codegen
7474 /// of a [T] const because we form a slice, a (*T,usize) pair, not
7575 /// a pointer to an LLVM array type. Similar for trait objects.
76- pub const_unsized : RefCell < FxHashMap < V , V > > ,
76+ pub const_unsized : RefCell < FxHashMap < & ' ll Value , & ' ll Value > > ,
7777
7878 /// Cache of emitted const globals (value -> global)
79- pub const_globals : RefCell < FxHashMap < V , V > > ,
79+ pub const_globals : RefCell < FxHashMap < & ' ll Value , & ' ll Value > > ,
8080
8181 /// List of globals for static variables which need to be passed to the
8282 /// LLVM function ReplaceAllUsesWith (RAUW) when codegen is complete.
8383 /// (We have to make sure we don't invalidate any Values referring
8484 /// to constants.)
85- pub statics_to_rauw : RefCell < Vec < ( V , V ) > > ,
85+ pub statics_to_rauw : RefCell < Vec < ( & ' ll Value , & ' ll Value ) > > ,
8686
8787 /// Statics that will be placed in the llvm.used variable
8888 /// See http://llvm.org/docs/LangRef.html#the-llvm-used-global-variable for details
89- pub used_statics : RefCell < Vec < V > > ,
89+ pub used_statics : RefCell < Vec < & ' ll Value > > ,
9090
9191 pub lltypes : RefCell < FxHashMap < ( Ty < ' tcx > , Option < VariantIdx > ) , & ' ll Type > > ,
9292 pub scalar_lltypes : RefCell < FxHashMap < Ty < ' tcx > , & ' ll Type > > ,
@@ -95,11 +95,11 @@ pub struct CodegenCx<'ll, 'tcx: 'll, V = &'ll Value> {
9595
9696 pub dbg_cx : Option < debuginfo:: CrateDebugContext < ' ll , ' tcx > > ,
9797
98- eh_personality : Cell < Option < V > > ,
99- eh_unwind_resume : Cell < Option < V > > ,
100- pub rust_try_fn : Cell < Option < V > > ,
98+ eh_personality : Cell < Option < & ' ll Value > > ,
99+ eh_unwind_resume : Cell < Option < & ' ll Value > > ,
100+ pub rust_try_fn : Cell < Option < & ' ll Value > > ,
101101
102- intrinsics : RefCell < FxHashMap < & ' static str , V > > ,
102+ intrinsics : RefCell < FxHashMap < & ' static str , & ' ll Value > > ,
103103
104104 /// A counter that is used for generating local symbol names
105105 local_gen_sym_counter : Cell < usize > ,
0 commit comments