Skip to content

Commit 1ce657a

Browse files
committed
librustc: Respect #[link_name] on extern statics. Fixes rust-lang#9270
1 parent 72e7c62 commit 1ce657a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/middle/trans/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2641,7 +2641,7 @@ pub fn get_item_val(ccx: @mut CrateContext, id: ast::NodeId) -> ValueRef {
26412641
foreign::register_foreign_item_fn(ccx, abis, &path, ni)
26422642
}
26432643
ast::foreign_item_static(*) => {
2644-
let ident = token::ident_to_str(&ni.ident);
2644+
let ident = foreign::link_name(ccx, ni);
26452645
let g = do ident.with_c_str |buf| {
26462646
unsafe {
26472647
let ty = type_of(ccx, ty);

0 commit comments

Comments
 (0)