提交 d8d9f2ad 编写于 作者: P Patrick Walton

rustc: Unconditionally zero out all GC-relevant types for now

上级 907ab4a1
......@@ -3,6 +3,7 @@
import lib::llvm::False;
import lib::llvm::True;
import lib::llvm::llvm::ValueRef;
import middle::trans;
import middle::trans::get_tydesc;
import middle::trans_common::*;
import middle::ty;
......@@ -38,6 +39,10 @@ fn add_gc_root(cx: &@block_ctxt, llval: ValueRef, ty: ty::t) -> @block_ctxt {
let gc_cx = bcx_ccx(cx).gc_cx;
// FIXME (issue #839): For now, we are unconditionally zeroing out all
// GC-relevant types. Eventually we should use typestate for this.
bcx = trans::zero_alloca(bcx, llval, ty).bcx;
let ti = none;
let td_r = get_tydesc(bcx, ty, false, ti);
bcx = td_r.result.bcx;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册