Skip to content

Commit c0549a9

Browse files
committed
---
yaml --- r: 2129 b: refs/heads/master c: 0984d1d h: refs/heads/master i: 2127: b68cfdd v: v3
1 parent fd9db57 commit c0549a9

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 36c332a24174e77c8f651879ffb71e918e7a96d1
2+
refs/heads/master: 0984d1db2e523d4c012b59dbcc87d53021f67cd2

trunk/src/comp/middle/trans.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7145,15 +7145,12 @@ fn make_common_glue(str output, bool optimize,
71457145
llvm.LLVMSetTarget(llmod, _str.buf(x86.get_target_triple()));
71467146
auto td = mk_target_data(x86.get_data_layout());
71477147
auto tn = mk_type_names();
7148-
let ValueRef crate_ptr =
7149-
llvm.LLVMAddGlobal(llmod, T_crate(tn), _str.buf("rust_crate"));
71507148

71517149
auto intrinsics = declare_intrinsics(llmod);
71527150

71537151
llvm.LLVMSetModuleInlineAsm(llmod, _str.buf(x86.get_module_asm()));
71547152

71557153
auto glues = make_glues(llmod, tn);
7156-
create_crate_constant(crate_ptr, glues);
71577154
make_memcpy_glue(glues.memcpy_glue);
71587155
make_bzero_glue(glues.bzero_glue);
71597156

@@ -7223,7 +7220,8 @@ fn trans_crate(session.session sess, @ast.crate crate,
72237220
trans_mod(cx, crate.node.module);
72247221
trans_vec_append_glue(cx);
72257222
if (!shared) {
7226-
trans_main_fn(cx, cx.ccx.crate_ptr);
7223+
trans_main_fn(cx, crate_ptr);
7224+
create_crate_constant(crate_ptr, ccx.glues);
72277225
}
72287226

72297227
// Translate the metadata.

0 commit comments

Comments
 (0)