Skip to content

Commit

Permalink
librustc: Respect #[link_name] on extern statics. Fixes #9270
Browse files Browse the repository at this point in the history
  • Loading branch information
luqmana committed Sep 18, 2013
1 parent 72e7c62 commit 1ce657a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc/middle/trans/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

5 comments on commit 1ce657a

@bors
Copy link
Contributor

@bors bors commented on 1ce657a Sep 18, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from catamorphism
at luqmana@1ce657a

@bors
Copy link
Contributor

@bors bors commented on 1ce657a Sep 18, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging luqmana/rust/esln = 1ce657a into auto

@bors
Copy link
Contributor

@bors bors commented on 1ce657a Sep 18, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

luqmana/rust/esln = 1ce657a merged ok, testing candidate = 9e636f1

@bors
Copy link
Contributor

@bors bors commented on 1ce657a Sep 18, 2013

@bors
Copy link
Contributor

@bors bors commented on 1ce657a Sep 18, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 9e636f1

Please sign in to comment.