librustc: De-@mut
CrateContext::all_llvm_symbols
This commit is contained in:
parent
b895ba52bc
commit
02bdda2776
@ -507,10 +507,11 @@ pub fn set_no_split_stack(f: ValueRef) {
|
||||
// Double-check that we never ask LLVM to declare the same symbol twice. It
|
||||
// silently mangles such symbols, breaking our linkage model.
|
||||
pub fn note_unique_llvm_symbol(ccx: &mut CrateContext, sym: @str) {
|
||||
if ccx.all_llvm_symbols.contains(&sym) {
|
||||
let mut all_llvm_symbols = ccx.all_llvm_symbols.borrow_mut();
|
||||
if all_llvm_symbols.get().contains(&sym) {
|
||||
ccx.sess.bug(~"duplicate LLVM symbol: " + sym);
|
||||
}
|
||||
ccx.all_llvm_symbols.insert(sym);
|
||||
all_llvm_symbols.get().insert(sym);
|
||||
}
|
||||
|
||||
|
||||
|
@ -97,7 +97,7 @@ pub struct CrateContext {
|
||||
adt_reprs: RefCell<HashMap<ty::t, @adt::Repr>>,
|
||||
symbol_hasher: Sha256,
|
||||
type_hashcodes: RefCell<HashMap<ty::t, @str>>,
|
||||
all_llvm_symbols: HashSet<@str>,
|
||||
all_llvm_symbols: RefCell<HashSet<@str>>,
|
||||
tcx: ty::ctxt,
|
||||
maps: astencode::Maps,
|
||||
stats: @mut Stats,
|
||||
@ -207,7 +207,7 @@ impl CrateContext {
|
||||
adt_reprs: RefCell::new(HashMap::new()),
|
||||
symbol_hasher: symbol_hasher,
|
||||
type_hashcodes: RefCell::new(HashMap::new()),
|
||||
all_llvm_symbols: HashSet::new(),
|
||||
all_llvm_symbols: RefCell::new(HashSet::new()),
|
||||
tcx: tcx,
|
||||
maps: maps,
|
||||
stats: @mut Stats {
|
||||
|
Loading…
x
Reference in New Issue
Block a user