@@ -47,7 +47,7 @@ use abi::Abi;
47
47
/// There is one `CodegenCx` per compilation unit. Each one has its own LLVM
48
48
/// `llvm::Context` so that several compilation units may be optimized in parallel.
49
49
/// 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 > {
51
51
pub tcx : TyCtxt < ' ll , ' tcx , ' tcx > ,
52
52
pub check_overflow : bool ,
53
53
pub use_dll_storage_attrs : bool ,
@@ -59,11 +59,11 @@ pub struct CodegenCx<'ll, 'tcx: 'll, V = &'ll Value> {
59
59
pub codegen_unit : Arc < CodegenUnit < ' tcx > > ,
60
60
61
61
/// Cache instances of monomorphic and polymorphic items
62
- pub instances : RefCell < FxHashMap < Instance < ' tcx > , V > > ,
62
+ pub instances : RefCell < FxHashMap < Instance < ' tcx > , & ' ll Value > > ,
63
63
/// 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 > > ,
65
65
/// Cache of constant strings,
66
- pub const_cstr_cache : RefCell < FxHashMap < LocalInternedString , V > > ,
66
+ pub const_cstr_cache : RefCell < FxHashMap < LocalInternedString , & ' ll Value > > ,
67
67
68
68
/// Reverse-direction for const ptrs cast from globals.
69
69
/// Key is a Value holding a *T,
@@ -73,20 +73,20 @@ pub struct CodegenCx<'ll, 'tcx: 'll, V = &'ll Value> {
73
73
/// when we ptrcast, and we have to ptrcast during codegen
74
74
/// of a [T] const because we form a slice, a (*T,usize) pair, not
75
75
/// 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 > > ,
77
77
78
78
/// 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 > > ,
80
80
81
81
/// List of globals for static variables which need to be passed to the
82
82
/// LLVM function ReplaceAllUsesWith (RAUW) when codegen is complete.
83
83
/// (We have to make sure we don't invalidate any Values referring
84
84
/// to constants.)
85
- pub statics_to_rauw : RefCell < Vec < ( V , V ) > > ,
85
+ pub statics_to_rauw : RefCell < Vec < ( & ' ll Value , & ' ll Value ) > > ,
86
86
87
87
/// Statics that will be placed in the llvm.used variable
88
88
/// 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 > > ,
90
90
91
91
pub lltypes : RefCell < FxHashMap < ( Ty < ' tcx > , Option < VariantIdx > ) , & ' ll Type > > ,
92
92
pub scalar_lltypes : RefCell < FxHashMap < Ty < ' tcx > , & ' ll Type > > ,
@@ -95,11 +95,11 @@ pub struct CodegenCx<'ll, 'tcx: 'll, V = &'ll Value> {
95
95
96
96
pub dbg_cx : Option < debuginfo:: CrateDebugContext < ' ll , ' tcx > > ,
97
97
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 > > ,
101
101
102
- intrinsics : RefCell < FxHashMap < & ' static str , V > > ,
102
+ intrinsics : RefCell < FxHashMap < & ' static str , & ' ll Value > > ,
103
103
104
104
/// A counter that is used for generating local symbol names
105
105
local_gen_sym_counter : Cell < usize > ,
0 commit comments