Skip to content

Commit

Permalink
Remove statics field from CodegenCx
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Aug 11, 2018
1 parent 0aa8d03 commit 44af068
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/librustc_codegen_llvm/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ pub fn get_static(cx: &CodegenCx<'ll, '_>, def_id: DefId) -> &'ll Value {
}

cx.instances.borrow_mut().insert(instance, g);
cx.statics.borrow_mut().insert(g, def_id);
g
}

Expand Down
5 changes: 0 additions & 5 deletions src/librustc_codegen_llvm/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ use common;
use llvm;
use rustc::dep_graph::DepGraphSafe;
use rustc::hir;
use rustc::hir::def_id::DefId;
use debuginfo;
use callee;
use base;
Expand Down Expand Up @@ -77,9 +76,6 @@ pub struct CodegenCx<'a, 'tcx: 'a> {
/// Cache of emitted const globals (value -> global)
pub const_globals: RefCell<FxHashMap<&'a Value, &'a Value>>,

/// Mapping from static definitions to their DefId's.
pub statics: RefCell<FxHashMap<&'a Value, DefId>>,

/// List of globals for static variables which need to be passed to the
/// LLVM function ReplaceAllUsesWith (RAUW) when codegen is complete.
/// (We have to make sure we don't invalidate any Values referring
Expand Down Expand Up @@ -297,7 +293,6 @@ impl<'a, 'tcx> CodegenCx<'a, 'tcx> {
const_cstr_cache: RefCell::new(FxHashMap()),
const_unsized: RefCell::new(FxHashMap()),
const_globals: RefCell::new(FxHashMap()),
statics: RefCell::new(FxHashMap()),
statics_to_rauw: RefCell::new(Vec::new()),
used_statics: RefCell::new(Vec::new()),
lltypes: RefCell::new(FxHashMap()),
Expand Down
1 change: 0 additions & 1 deletion src/librustc_codegen_llvm/mono_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ fn predefine_static<'a, 'tcx>(cx: &CodegenCx<'a, 'tcx>,
}

cx.instances.borrow_mut().insert(instance, g);
cx.statics.borrow_mut().insert(g, def_id);
}

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

0 comments on commit 44af068

Please sign in to comment.