Support non-immediates in unique-box type glue

Issue #409
This commit is contained in:
Brian Anderson 2011-09-23 23:00:46 -07:00
parent 856acbf66d
commit 777a536313
3 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,8 @@
INIT,
trans_shared_free,
drop_ty,
new_sub_block_ctxt
new_sub_block_ctxt,
load_if_immediate
};
export trans_uniq, make_free_glue, type_is_unique_box, copy_val,
@ -115,7 +116,8 @@ fn duplicate(bcx: @block_ctxt, v: ValueRef, t: ty::t)
let content_ty = content_ty(bcx, t);
let {bcx, val: llptr} = alloc_uniq(bcx, t);
let src = Load(bcx, Load(bcx, v));
let src = Load(bcx, v);
let src = load_if_immediate(bcx, src, content_ty);
let dst = llptr;
let bcx = trans::copy_val(bcx, INIT, dst, src, content_ty);
Store(bcx, dst, v);

View File

@ -1,4 +1,3 @@
// xfail-test
// -*- rust -*-

View File

@ -1,4 +1,3 @@
// xfail-test
// -*- rust -*-