@@ -2349,12 +2349,7 @@ fn drop_slot(cx: &@block_ctxt, slot: ValueRef, t: &ty::t) -> result {
2349
2349
let re = drop_ty ( cx, llptr, t) ;
2350
2350
let llty = val_ty ( slot) ;
2351
2351
let llelemty = lib:: llvm:: llvm:: LLVMGetElementType ( llty) ;
2352
- if ty:: type_is_structural ( bcx_tcx ( cx) , t) {
2353
- call_bzero ( cx, slot, C_uint ( llsize_of_real ( bcx_ccx ( cx) , llelemty) ) ,
2354
- C_uint ( llalign_of_real ( bcx_ccx ( cx) , llelemty) ) ) ;
2355
- } else {
2356
- cx. build . Store ( C_null ( llelemty) , slot) ;
2357
- }
2352
+ call_bzero ( cx, slot, llsize_of ( llelemty) , C_uint ( 1 u) ) ;
2358
2353
ret re;
2359
2354
}
2360
2355
@@ -5860,13 +5855,7 @@ fn zero_alloca(cx: &@block_ctxt, llptr: ValueRef, t: ty::t) -> result {
5860
5855
bcx = call_bzero ( llalign. bcx , llptr, llsz. val , llalign. val ) . bcx ;
5861
5856
} else {
5862
5857
let llty = type_of ( bcx_ccx ( bcx) , cx. sp , t) ;
5863
- if ty:: type_is_structural ( bcx_tcx ( cx) , t) {
5864
- bcx = call_bzero ( cx, llptr,
5865
- C_uint ( llsize_of_real ( bcx_ccx ( cx) , llty) ) ,
5866
- C_uint ( llalign_of_real ( bcx_ccx ( cx) , llty) ) ) . bcx ;
5867
- } else {
5868
- bcx. build . Store ( C_null ( llty) , llptr) ;
5869
- }
5858
+ bcx = call_bzero ( cx, llptr, llsize_of ( llty) , C_uint ( 1 u) ) . bcx ;
5870
5859
}
5871
5860
ret rslt( bcx, llptr) ;
5872
5861
}
0 commit comments