librustc: Respect #[link_name] on extern statics. Fixes #9270

This commit is contained in:
Luqman Aden 2013-09-17 21:03:56 -04:00
parent 72e7c62ec4
commit 1ce657aa1f
1 changed files with 1 additions and 1 deletions

View File

@ -2641,7 +2641,7 @@ pub fn get_item_val(ccx: @mut CrateContext, id: ast::NodeId) -> ValueRef {
foreign::register_foreign_item_fn(ccx, abis, &path, ni)
}
ast::foreign_item_static(*) => {
let ident = token::ident_to_str(&ni.ident);
let ident = foreign::link_name(ccx, ni);
let g = do ident.with_c_str |buf| {
unsafe {
let ty = type_of(ccx, ty);