diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2011-08-04 16:33:04 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2011-08-04 16:33:38 -0700 |
| commit | 4d180793f04ece462d2053c1a04ea2b0d73b4ee2 (patch) | |
| tree | 02b240351b79e5cc103991ebdce1d6638099f392 | |
| parent | cf9c0f9d933cd1266256ca46c84e0dc9a85a58cc (diff) | |
| download | rust-4d180793f04ece462d2053c1a04ea2b0d73b4ee2.tar.gz rust-4d180793f04ece462d2053c1a04ea2b0d73b4ee2.zip | |
rustc: bzero in zero_alloca. Shaves off a second or three.
| -rw-r--r-- | src/comp/middle/trans.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 0793d390d57..b5171fdb9d1 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -5854,7 +5854,7 @@ fn zero_alloca(cx: &@block_ctxt, llptr: ValueRef, t: ty::t) -> result { bcx = call_bzero(llalign.bcx, llptr, llsz.val, llalign.val).bcx; } else { let llty = type_of(bcx_ccx(bcx), cx.sp, t); - bcx.build.Store(C_null(llty), llptr); + bcx = call_bzero(cx, llptr, llsize_of(llty), C_uint(1u)).bcx; } ret rslt(bcx, llptr); } |
