Skip to content

Commit cfdde36

Browse files
committed
---
yaml --- r: 90734 b: refs/heads/master c: 02bdda2 h: refs/heads/master v: v3
1 parent b2b25e2 commit cfdde36

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: b895ba52bc4b5e7f6887327f3918b4abeb8430cb
2+
refs/heads/master: 02bdda27763bcb5d3038d6abd7b1c50d2c394a1c
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
55
refs/heads/try: b160761e35efcd1207112b3b782c06633cf441a8

trunk/src/librustc/middle/trans/base.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,10 +507,11 @@ pub fn set_no_split_stack(f: ValueRef) {
507507
// Double-check that we never ask LLVM to declare the same symbol twice. It
508508
// silently mangles such symbols, breaking our linkage model.
509509
pub fn note_unique_llvm_symbol(ccx: &mut CrateContext, sym: @str) {
510-
if ccx.all_llvm_symbols.contains(&sym) {
510+
let mut all_llvm_symbols = ccx.all_llvm_symbols.borrow_mut();
511+
if all_llvm_symbols.get().contains(&sym) {
511512
ccx.sess.bug(~"duplicate LLVM symbol: " + sym);
512513
}
513-
ccx.all_llvm_symbols.insert(sym);
514+
all_llvm_symbols.get().insert(sym);
514515
}
515516
516517

trunk/src/librustc/middle/trans/context.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ pub struct CrateContext {
9797
adt_reprs: RefCell<HashMap<ty::t, @adt::Repr>>,
9898
symbol_hasher: Sha256,
9999
type_hashcodes: RefCell<HashMap<ty::t, @str>>,
100-
all_llvm_symbols: HashSet<@str>,
100+
all_llvm_symbols: RefCell<HashSet<@str>>,
101101
tcx: ty::ctxt,
102102
maps: astencode::Maps,
103103
stats: @mut Stats,
@@ -207,7 +207,7 @@ impl CrateContext {
207207
adt_reprs: RefCell::new(HashMap::new()),
208208
symbol_hasher: symbol_hasher,
209209
type_hashcodes: RefCell::new(HashMap::new()),
210-
all_llvm_symbols: HashSet::new(),
210+
all_llvm_symbols: RefCell::new(HashSet::new()),
211211
tcx: tcx,
212212
maps: maps,
213213
stats: @mut Stats {

0 commit comments

Comments
 (0)