Skip to content

Commit 77a00cc

Browse files
debuginfo: Fixes related to changed memory layout of unique allocations
1 parent 3b06df4 commit 77a00cc

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

src/librustc/middle/trans/debuginfo.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,6 @@ fn create_enum_md(cx: &mut CrateContext,
568568
assert!(Type::enum_discrim(cx) == cx.int_type);
569569
let discriminant_type_md = get_or_create_type(cx, ty::mk_int(), span);
570570

571-
572571
let variants : &[ty::VariantInfo] = *ty::enum_variants(cx.tcx, enum_def_id);
573572

574573
let enumerators : ~[(~str, int)] = variants
@@ -971,8 +970,7 @@ fn get_or_create_type(cx: &mut CrateContext, t: ty::t, span: span) -> DIType {
971970
ty::ty_enum(def_id, ref substs) => {
972971
create_enum_md(cx, t, def_id, substs, span)
973972
},
974-
ty::ty_box(ref mt) |
975-
ty::ty_uniq(ref mt) => {
973+
ty::ty_box(ref mt) => {
976974
let content_llvm_type = type_of::type_of(cx, mt.ty);
977975
let content_type_metadata = get_or_create_type(cx, mt.ty, span);
978976

@@ -998,7 +996,8 @@ fn get_or_create_type(cx: &mut CrateContext, t: ty::t, span: span) -> DIType {
998996
}
999997
}
1000998
},
1001-
ty::ty_ptr(ref mt) |
999+
ty::ty_uniq(ref mt) |
1000+
ty::ty_ptr(ref mt) |
10021001
ty::ty_rptr(_, ref mt) => {
10031002
let pointee = get_or_create_type(cx, mt.ty, span);
10041003
create_pointer_type(cx, t, span, pointee)

src/test/debug-info/box.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
// debugger:break _zzz
1414
// debugger:run
1515
// debugger:finish
16-
// debugger:print a->val
16+
// debugger:print *a
1717
// check:$1 = 1
18-
// debugger:print b->val
18+
// debugger:print *b
1919
// check:$2 = {2, 3.5}
2020
// debugger:print c->val
2121
// check:$3 = 4

src/test/debug-info/boxed-struct.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
// debugger:run
1414
// debugger:finish
1515

16-
// debugger:print unique->val
16+
// debugger:print *unique
1717
// check:$1 = {x = 99, y = 999, z = 9999, w = 99999}
1818

1919
// debugger:print managed->val
2020
// check:$2 = {x = 88, y = 888, z = 8888, w = 88888}
2121

22-
// debugger:print unique_dtor->val
22+
// debugger:print *unique_dtor
2323
// check:$3 = {x = 77, y = 777, z = 7777, w = 77777}
2424

2525
// debugger:print managed_dtor->val

0 commit comments

Comments
 (0)