@@ -1911,7 +1911,7 @@ fn monomorphic_fn(ccx: @crate_ctxt, fn_id: ast::def_id, real_substs: [ty::t],
1911
1911
let llfty = type_of_fn_from_ty ( ccx, mono_ty) ;
1912
1912
1913
1913
let pt = * pt + [ path_name ( ccx. names ( name) ) ] ;
1914
- let s = mangle_exported_name ( ccx, pt, fn_id . node ) ;
1914
+ let s = mangle_exported_name ( ccx, pt, mono_ty ) ;
1915
1915
let lldecl = decl_internal_cdecl_fn ( ccx. llmod , s, llfty) ;
1916
1916
ccx. monomorphized . insert ( hash_id, lldecl) ;
1917
1917
ccx. item_symbols . insert ( fn_id. node , s) ;
@@ -4418,7 +4418,7 @@ fn register_fn_full(ccx: @crate_ctxt, sp: span, path: path,
4418
4418
fn register_fn_fuller ( ccx : @crate_ctxt , sp : span , path : path ,
4419
4419
node_id : ast:: node_id , node_type : ty:: t ,
4420
4420
cc : lib:: llvm:: CallConv , llfty : TypeRef ) -> ValueRef {
4421
- let ps: str = mangle_exported_name ( ccx, path, node_id ) ;
4421
+ let ps: str = mangle_exported_name ( ccx, path, node_type ) ;
4422
4422
let llfn: ValueRef = decl_fn ( ccx. llmod , ps, cc, llfty) ;
4423
4423
ccx. item_symbols . insert ( node_id, ps) ;
4424
4424
@@ -4547,7 +4547,7 @@ fn get_item_val(ccx: @crate_ctxt, id: ast::node_id) -> ValueRef {
4547
4547
alt check i. node {
4548
4548
ast:: item_const ( _, _) {
4549
4549
let typ = ty:: node_id_to_type ( ccx. tcx , i. id ) ;
4550
- let s = mangle_exported_name ( ccx, my_path, i . id ) ;
4550
+ let s = mangle_exported_name ( ccx, my_path, typ ) ;
4551
4551
let g = str:: as_c_str ( s, { |buf|
4552
4552
llvm:: LLVMAddGlobal ( ccx. llmod , type_of ( ccx, typ) , buf)
4553
4553
} ) ;
@@ -4634,7 +4634,7 @@ fn trans_constant(ccx: @crate_ctxt, it: @ast::item) {
4634
4634
for vec:: each( variants) { |variant|
4635
4635
let p = path + [ path_name( variant. node. name) ,
4636
4636
path_name( "discrim" ) ] ;
4637
- let s = mangle_exported_name ( ccx, p, it . id ) ;
4637
+ let s = mangle_exported_name ( ccx, p, ty :: mk_int ( ccx . tcx ) ) ;
4638
4638
let disr_val = vi[ i] . disr_val ;
4639
4639
note_unique_llvm_symbol ( ccx, s) ;
4640
4640
let discrim_gvar = str:: as_c_str ( s, { |buf|
0 commit comments