aboutsummaryrefslogtreecommitdiff
path: root/src/comp
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2011-05-10 17:58:11 -0700
committerGraydon Hoare <[email protected]>2011-05-10 18:07:40 -0700
commitcf3e737eeeabb26ca555fd8ed85f4df7317e992a (patch)
treeac21edda19429e1d0741168c8151090576706290 /src/comp
parentrustc: Create mutable vectors in macos_OS.rs. Should put out Darwin tinderbox. (diff)
downloadrust-cf3e737eeeabb26ca555fd8ed85f4df7317e992a.tar.xz
rust-cf3e737eeeabb26ca555fd8ed85f4df7317e992a.zip
Avoid mangle_name_by_type_only call in tydesc names unless debugging.
Diffstat (limited to 'src/comp')
-rw-r--r--src/comp/middle/trans.rs9
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)))),