diff options
| author | Graydon Hoare <[email protected]> | 2011-05-10 17:58:11 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-05-10 18:07:40 -0700 |
| commit | cf3e737eeeabb26ca555fd8ed85f4df7317e992a (patch) | |
| tree | ac21edda19429e1d0741168c8151090576706290 /src/comp/middle/trans.rs | |
| parent | rustc: Create mutable vectors in macos_OS.rs. Should put out Darwin tinderbox. (diff) | |
| download | rust-cf3e737eeeabb26ca555fd8ed85f4df7317e992a.tar.xz rust-cf3e737eeeabb26ca555fd8ed85f4df7317e992a.zip | |
Avoid mangle_name_by_type_only call in tydesc names unless debugging.
Diffstat (limited to 'src/comp/middle/trans.rs')
| -rw-r--r-- | src/comp/middle/trans.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 4f9de496..95183c53 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -1783,7 +1783,14 @@ fn declare_tydesc(@local_ctxt cx, ty.t t) -> @tydesc_info { auto glue_fn_ty = T_ptr(T_glue_fn(ccx.tn)); - auto name = mangle_name_by_type_only(ccx, t, "tydesc"); + auto name; + if (cx.ccx.sess.get_opts().debuginfo) { + name = mangle_name_by_type_only(cx.ccx, t, "tydesc"); + name = sanitize(name); + } else { + name = mangle_name_by_seq(cx.ccx, cx.path, "tydesc"); + } + 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)))), |