Skip to content

Commit abf3797

Browse files
author
Elliott Slaughter
committed
---
yaml --- r: 30053 b: refs/heads/incoming c: a7a74c7 h: refs/heads/master i: 30051: 5609633 v: v3
1 parent 0c0b775 commit abf3797

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
9-
refs/heads/incoming: c2e99ba8265085bde0a80283a68b4010a4a3aa34
9+
refs/heads/incoming: a7a74c79fa09d918703083f35d22c77351bfc992
1010
refs/heads/dist-snap: 2f32a1581f522e524009138b33b1c7049ced668d
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/rustc/middle/trans/base.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,16 @@ fn emit_tydescs(ccx: @crate_ctxt) {
657657
llvm::LLVMSetInitializer(gvar, tydesc);
658658
llvm::LLVMSetGlobalConstant(gvar, True);
659659
lib::llvm::SetLinkage(gvar, lib::llvm::InternalLinkage);
660+
661+
// Index tydesc by addrspace.
662+
let llty = T_ptr(ccx.tydesc_type);
663+
let addrspace_name = #fmt("_gc_addrspace_metadata_%u",
664+
ti.addrspace as uint);
665+
let addrspace_gvar = str::as_c_str(addrspace_name, |buf| {
666+
llvm::LLVMAddGlobal(ccx.llmod, llty, buf)
667+
});
668+
lib::llvm::SetLinkage(addrspace_gvar, lib::llvm::InternalLinkage);
669+
llvm::LLVMSetInitializer(addrspace_gvar, gvar);
660670
};
661671
}
662672

0 commit comments

Comments
 (0)