Skip to content

Commit 44af068

Browse files
committed
Remove statics field from CodegenCx
1 parent 0aa8d03 commit 44af068

File tree

3 files changed

+0
-7
lines changed

3 files changed

+0
-7
lines changed

src/librustc_codegen_llvm/consts.rs

-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ pub fn get_static(cx: &CodegenCx<'ll, '_>, def_id: DefId) -> &'ll Value {
230230
}
231231

232232
cx.instances.borrow_mut().insert(instance, g);
233-
cx.statics.borrow_mut().insert(g, def_id);
234233
g
235234
}
236235

src/librustc_codegen_llvm/context.rs

-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ use common;
1313
use llvm;
1414
use rustc::dep_graph::DepGraphSafe;
1515
use rustc::hir;
16-
use rustc::hir::def_id::DefId;
1716
use debuginfo;
1817
use callee;
1918
use base;
@@ -77,9 +76,6 @@ pub struct CodegenCx<'a, 'tcx: 'a> {
7776
/// Cache of emitted const globals (value -> global)
7877
pub const_globals: RefCell<FxHashMap<&'a Value, &'a Value>>,
7978

80-
/// Mapping from static definitions to their DefId's.
81-
pub statics: RefCell<FxHashMap<&'a Value, DefId>>,
82-
8379
/// List of globals for static variables which need to be passed to the
8480
/// LLVM function ReplaceAllUsesWith (RAUW) when codegen is complete.
8581
/// (We have to make sure we don't invalidate any Values referring
@@ -297,7 +293,6 @@ impl<'a, 'tcx> CodegenCx<'a, 'tcx> {
297293
const_cstr_cache: RefCell::new(FxHashMap()),
298294
const_unsized: RefCell::new(FxHashMap()),
299295
const_globals: RefCell::new(FxHashMap()),
300-
statics: RefCell::new(FxHashMap()),
301296
statics_to_rauw: RefCell::new(Vec::new()),
302297
used_statics: RefCell::new(Vec::new()),
303298
lltypes: RefCell::new(FxHashMap()),

src/librustc_codegen_llvm/mono_item.rs

-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ fn predefine_static<'a, 'tcx>(cx: &CodegenCx<'a, 'tcx>,
143143
}
144144

145145
cx.instances.borrow_mut().insert(instance, g);
146-
cx.statics.borrow_mut().insert(g, def_id);
147146
}
148147

149148
fn predefine_fn<'a, 'tcx>(cx: &CodegenCx<'a, 'tcx>,

0 commit comments

Comments
 (0)