debuginfo: Fixes related to changed memory layout of unique allocations

This commit is contained in:
Michael Woerister 2013-07-09 15:14:10 +02:00
parent 3b06df4e35
commit 77a00cca03
3 changed files with 7 additions and 8 deletions

View File

@ -568,7 +568,6 @@ fn create_enum_md(cx: &mut CrateContext,
assert!(Type::enum_discrim(cx) == cx.int_type);
let discriminant_type_md = get_or_create_type(cx, ty::mk_int(), span);
let variants : &[ty::VariantInfo] = *ty::enum_variants(cx.tcx, enum_def_id);
let enumerators : ~[(~str, int)] = variants
@ -971,8 +970,7 @@ fn get_or_create_type(cx: &mut CrateContext, t: ty::t, span: span) -> DIType {
ty::ty_enum(def_id, ref substs) => {
create_enum_md(cx, t, def_id, substs, span)
},
ty::ty_box(ref mt) |
ty::ty_uniq(ref mt) => {
ty::ty_box(ref mt) => {
let content_llvm_type = type_of::type_of(cx, mt.ty);
let content_type_metadata = get_or_create_type(cx, mt.ty, span);
@ -998,7 +996,8 @@ fn get_or_create_type(cx: &mut CrateContext, t: ty::t, span: span) -> DIType {
}
}
},
ty::ty_ptr(ref mt) |
ty::ty_uniq(ref mt) |
ty::ty_ptr(ref mt) |
ty::ty_rptr(_, ref mt) => {
let pointee = get_or_create_type(cx, mt.ty, span);
create_pointer_type(cx, t, span, pointee)

View File

@ -13,9 +13,9 @@
// debugger:break _zzz
// debugger:run
// debugger:finish
// debugger:print a->val
// debugger:print *a
// check:$1 = 1
// debugger:print b->val
// debugger:print *b
// check:$2 = {2, 3.5}
// debugger:print c->val
// check:$3 = 4

View File

@ -13,13 +13,13 @@
// debugger:run
// debugger:finish
// debugger:print unique->val
// debugger:print *unique
// check:$1 = {x = 99, y = 999, z = 9999, w = 99999}
// debugger:print managed->val
// check:$2 = {x = 88, y = 888, z = 8888, w = 88888}
// debugger:print unique_dtor->val
// debugger:print *unique_dtor
// check:$3 = {x = 77, y = 777, z = 7777, w = 77777}
// debugger:print managed_dtor->val