diff options
| author | Patrick Walton <[email protected]> | 2011-03-20 15:05:13 -0700 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2011-03-20 15:05:13 -0700 |
| commit | d31bfc8692fa311bd179ed61a14c50c285b46dc7 (patch) | |
| tree | 3e12ba63c4869770918cd6eb861e906abd0248c9 /src/comp | |
| parent | Begin porting rules for testsuite execution. (diff) | |
| download | rust-d31bfc8692fa311bd179ed61a14c50c285b46dc7.tar.xz rust-d31bfc8692fa311bd179ed61a14c50c285b46dc7.zip | |
rustc: Internalize glue. Cuts libstd size by 8% or so.
Diffstat (limited to 'src/comp')
| -rw-r--r-- | src/comp/middle/trans.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 50ce6716..f8d2b9fd 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -1478,7 +1478,9 @@ fn declare_generic_glue(@crate_ctxt cx, @ty.t t, str name) -> ValueRef { auto fn_name = cx.names.next("_rust_" + name) + sep() + ty.ty_to_str(t); fn_name = sanitize(fn_name); - ret decl_fastcall_fn(cx.llmod, fn_name, llfnty); + auto llfn = decl_fastcall_fn(cx.llmod, fn_name, llfnty); + llvm.LLVMSetLinkage(llfn, lib.llvm.LLVMPrivateLinkage as llvm.Linkage); + ret llfn; } fn make_generic_glue(@crate_ctxt cx, @ty.t t, ValueRef llfn, |