Skip to content

Commit f57ad4d

Browse files
committed
---
yaml --- r: 96981 b: refs/heads/dist-snap c: 02bdda2 h: refs/heads/master i: 96979: 6a6b305 v: v3
1 parent 2e825ed commit f57ad4d

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
@@ -6,7 +6,7 @@ refs/heads/try: c274a6888410ce3e357e014568b43310ed787d36
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: b895ba52bc4b5e7f6887327f3918b4abeb8430cb
9+
refs/heads/dist-snap: 02bdda27763bcb5d3038d6abd7b1c50d2c394a1c
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/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

branches/dist-snap/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)