Skip to content

Commit 4d18079

Browse files
committed
rustc: bzero in zero_alloca. Shaves off a second or three.
1 parent cf9c0f9 commit 4d18079

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/comp/middle/trans.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5854,7 +5854,7 @@ fn zero_alloca(cx: &@block_ctxt, llptr: ValueRef, t: ty::t) -> result {
58545854
bcx = call_bzero(llalign.bcx, llptr, llsz.val, llalign.val).bcx;
58555855
} else {
58565856
let llty = type_of(bcx_ccx(bcx), cx.sp, t);
5857-
bcx.build.Store(C_null(llty), llptr);
5857+
bcx = call_bzero(cx, llptr, llsize_of(llty), C_uint(1u)).bcx;
58585858
}
58595859
ret rslt(bcx, llptr);
58605860
}

0 commit comments

Comments
 (0)