1
Fork 0

rustc: Internalize glue. Cuts libstd size by 8% or so.

This commit is contained in:
Patrick Walton 2011-03-20 15:05:13 -07:00
parent 4691a75150
commit d31bfc8692

View file

@ -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,