diff options
| author | Patrick Walton <[email protected]> | 2011-04-25 16:59:49 -0700 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2011-04-25 17:00:25 -0700 |
| commit | c4e13cd1fa451327a756efc0c23bbbdbb9e7e1ae (patch) | |
| tree | da2c6ec1d2c28e316ee97df032c615bb92ad2de4 /src/comp/middle/trans.rs | |
| parent | Kick ty_var and ty_local entries out of the type store. Pre-compute presence ... (diff) | |
| download | rust-c4e13cd1fa451327a756efc0c23bbbdbb9e7e1ae.tar.xz rust-c4e13cd1fa451327a756efc0c23bbbdbb9e7e1ae.zip | |
rustc: Use the abbreviated type names to avoid LLVM bitcode size explosion
Diffstat (limited to 'src/comp/middle/trans.rs')
| -rw-r--r-- | src/comp/middle/trans.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 8d8c9926..b7896ba4 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -786,7 +786,8 @@ fn type_of_inner(@crate_ctxt cx, ty.t t) -> TypeRef { } check (llty as int != 0); - llvm.LLVMAddTypeName(cx.llmod, _str.buf(ty.ty_to_str(cx.tcx, t)), llty); + llvm.LLVMAddTypeName(cx.llmod, _str.buf(ty.ty_to_abbrev_str(cx.tcx, t)), + llty); cx.lltypes.insert(t, llty); ret llty; } @@ -1645,7 +1646,7 @@ fn declare_tydesc(@local_ctxt cx, ty.t t) { auto glue_fn_ty = T_ptr(T_glue_fn(ccx.tn)); auto name = sanitize(ccx.names.next("tydesc_" + - ty.ty_to_str(cx.ccx.tcx, t))); + ty.ty_to_abbrev_str(cx.ccx.tcx, t))); auto gvar = llvm.LLVMAddGlobal(ccx.llmod, T_tydesc(ccx.tn), _str.buf(name)); auto tydesc = C_struct(vec(C_null(T_ptr(T_ptr(T_tydesc(ccx.tn)))), |