@@ -1944,7 +1944,7 @@ fn monomorphic_fn(ccx: @crate_ctxt, fn_id: ast::def_id, real_substs: [ty::t],
1944
1944
let llfty = type_of_fn_from_ty ( ccx, mono_ty) ;
1945
1945
1946
1946
let pt = * pt + [ path_name ( ccx. names ( name) ) ] ;
1947
- let s = mangle_exported_name ( ccx, pt, mono_ty ) ;
1947
+ let s = mangle_exported_name ( ccx, pt, fn_id . node ) ;
1948
1948
let lldecl = decl_internal_cdecl_fn ( ccx. llmod , s, llfty) ;
1949
1949
ccx. monomorphized . insert ( hash_id, lldecl) ;
1950
1950
ccx. item_symbols . insert ( fn_id. node , s) ;
@@ -4454,7 +4454,7 @@ fn register_fn_full(ccx: @crate_ctxt, sp: span, path: path,
4454
4454
fn register_fn_fuller ( ccx : @crate_ctxt , sp : span , path : path ,
4455
4455
node_id : ast:: node_id , node_type : ty:: t ,
4456
4456
cc : lib:: llvm:: CallConv , llfty : TypeRef ) -> ValueRef {
4457
- let ps: str = mangle_exported_name ( ccx, path, node_type ) ;
4457
+ let ps: str = mangle_exported_name ( ccx, path, node_id ) ;
4458
4458
let llfn: ValueRef = decl_fn ( ccx. llmod , ps, cc, llfty) ;
4459
4459
ccx. item_symbols . insert ( node_id, ps) ;
4460
4460
@@ -4583,7 +4583,7 @@ fn get_item_val(ccx: @crate_ctxt, id: ast::node_id) -> ValueRef {
4583
4583
alt check i. node {
4584
4584
ast:: item_const ( _, _) {
4585
4585
let typ = ty:: node_id_to_type ( ccx. tcx , i. id ) ;
4586
- let s = mangle_exported_name ( ccx, my_path, typ ) ;
4586
+ let s = mangle_exported_name ( ccx, my_path, i . id ) ;
4587
4587
let g = str:: as_c_str ( s, { |buf|
4588
4588
llvm:: LLVMAddGlobal ( ccx. llmod , type_of ( ccx, typ) , buf)
4589
4589
} ) ;
@@ -4670,7 +4670,7 @@ fn trans_constant(ccx: @crate_ctxt, it: @ast::item) {
4670
4670
for vec:: each( variants) { |variant|
4671
4671
let p = path + [ path_name( variant. node. name) ,
4672
4672
path_name( "discrim" ) ] ;
4673
- let s = mangle_exported_name ( ccx, p, ty :: mk_int ( ccx . tcx ) ) ;
4673
+ let s = mangle_exported_name ( ccx, p, it . id ) ;
4674
4674
let disr_val = vi[ i] . disr_val ;
4675
4675
note_unique_llvm_symbol ( ccx, s) ;
4676
4676
let discrim_gvar = str:: as_c_str ( s, { |buf|
0 commit comments