File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
src/librustc/middle/trans Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -507,10 +507,11 @@ pub fn set_no_split_stack(f: ValueRef) {
507
507
// Double-check that we never ask LLVM to declare the same symbol twice. It
508
508
// silently mangles such symbols, breaking our linkage model.
509
509
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) {
511
512
ccx. sess . bug ( ~"duplicate LLVM symbol: " + sym);
512
513
}
513
- ccx. all_llvm_symbols.insert(sym);
514
+ all_llvm_symbols.get() .insert(sym);
514
515
}
515
516
516
517
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ pub struct CrateContext {
97
97
adt_reprs : RefCell < HashMap < ty:: t , @adt:: Repr > > ,
98
98
symbol_hasher : Sha256 ,
99
99
type_hashcodes : RefCell < HashMap < ty:: t , @str > > ,
100
- all_llvm_symbols : HashSet < @str > ,
100
+ all_llvm_symbols : RefCell < HashSet < @str > > ,
101
101
tcx : ty:: ctxt ,
102
102
maps : astencode:: Maps ,
103
103
stats : @mut Stats ,
@@ -207,7 +207,7 @@ impl CrateContext {
207
207
adt_reprs : RefCell :: new ( HashMap :: new ( ) ) ,
208
208
symbol_hasher : symbol_hasher,
209
209
type_hashcodes : RefCell :: new ( HashMap :: new ( ) ) ,
210
- all_llvm_symbols : HashSet :: new ( ) ,
210
+ all_llvm_symbols : RefCell :: new ( HashSet :: new ( ) ) ,
211
211
tcx : tcx,
212
212
maps : maps,
213
213
stats : @mut Stats {
You can’t perform that action at this time.
0 commit comments