about summary refs log tree commit diff
path: root/src/comp/middle
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-09-28 15:26:11 -0700
committerBrian Anderson <banderson@mozilla.com>2011-09-28 15:35:21 -0700
commit15e34deba3efa7c064bf9ffe0fa1eff47f9b117e (patch)
tree32b1f995f115e0fe1d9d846c96dc702cb63f7990 /src/comp/middle
parente1ba559c03624990e06b98d4329d5daee089acca (diff)
Eliminate glue.o. Closes #990
Diffstat (limited to 'src/comp/middle')
-rw-r--r--src/comp/middle/trans.rs31
-rw-r--r--src/comp/middle/trans_common.rs3
2 files changed, 0 insertions, 34 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs
index a74f358795e..1a6f046b0cd 100644
--- a/src/comp/middle/trans.rs
+++ b/src/comp/middle/trans.rs
@@ -6044,35 +6044,6 @@ fn decl_no_op_type_glue(llmod: ModuleRef, taskptr_type: TypeRef) -> ValueRef {
     ret decl_cdecl_fn(llmod, abi::no_op_type_glue_name(), ty);
 }
 
-fn make_glues(llmod: ModuleRef, taskptr_type: TypeRef) -> @glue_fns {
-    ret @{no_op_type_glue: decl_no_op_type_glue(llmod, taskptr_type)};
-}
-
-fn make_common_glue(sess: session::session, output: str) {
-    // FIXME: part of this is repetitive and is probably a good idea
-    // to autogen it.
-    let task_type = T_task();
-    let taskptr_type = T_ptr(task_type);
-
-    let llmod = str::as_buf("rust_out", {|buf|
-        llvm::LLVMModuleCreateWithNameInContext
-            (buf, llvm::LLVMGetGlobalContext())
-    });
-    let _: () =
-        str::as_buf(x86::get_data_layout(),
-                    {|buf| llvm::LLVMSetDataLayout(llmod, buf) });
-    let _: () =
-        str::as_buf(x86::get_target_triple(),
-                    {|buf| llvm::LLVMSetTarget(llmod, buf) });
-    mk_target_data(x86::get_data_layout());
-    declare_intrinsics(llmod);
-    let _: () =
-        str::as_buf(x86::get_module_asm(),
-                    {|buf| llvm::LLVMSetModuleInlineAsm(llmod, buf) });
-    make_glues(llmod, taskptr_type);
-    link::write::run_passes(sess, llmod, output);
-}
-
 fn create_module_map(ccx: @crate_ctxt) -> ValueRef {
     let elttype = T_struct([T_int(), T_int()]);
     let maptype = T_array(elttype, ccx.module_data.size() + 1u);
@@ -6183,7 +6154,6 @@ fn trans_crate(sess: session::session, crate: @ast::crate, tcx: ty::ctxt,
     tn.associate("taskptr", taskptr_type);
     let tydesc_type = T_tydesc(taskptr_type);
     tn.associate("tydesc", tydesc_type);
-    let glues = make_glues(llmod, taskptr_type);
     let hasher = ty::hash_ty;
     let eqer = ty::eq_ty;
     let tag_sizes = map::mk_hashmap::<ty::t, uint>(hasher, eqer);
@@ -6212,7 +6182,6 @@ fn trans_crate(sess: session::session, crate: @ast::crate, tcx: ty::ctxt,
           tydescs: tydescs,
           module_data: new_str_hash::<ValueRef>(),
           lltypes: lltypes,
-          glues: glues,
           names: namegen(0),
           sha: sha,
           type_sha1s: sha1s,
diff --git a/src/comp/middle/trans_common.rs b/src/comp/middle/trans_common.rs
index eb6b6c9f311..d001abdac84 100644
--- a/src/comp/middle/trans_common.rs
+++ b/src/comp/middle/trans_common.rs
@@ -41,8 +41,6 @@ obj namegen(mutable i: int) {
 
 type derived_tydesc_info = {lltydesc: ValueRef, escapes: bool};
 
-type glue_fns = {no_op_type_glue: ValueRef};
-
 tag tydesc_kind {
     tk_static; // Static (monomorphic) type descriptor.
     tk_param; // Type parameter.
@@ -111,7 +109,6 @@ type crate_ctxt =
      tydescs: hashmap<ty::t, @tydesc_info>,
      module_data: hashmap<str, ValueRef>,
      lltypes: hashmap<ty::t, TypeRef>,
-     glues: @glue_fns,
      names: namegen,
      sha: std::sha1::sha1,
      type_sha1s: hashmap<ty::t, str>,