Skip to content

Commit 7ab58db

Browse files
committed
rustc: Use llsize_of rather than size_of in trans_malloc_without_cleanup(). Should put out burning tinderbox...
1 parent 675f762 commit 7ab58db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/comp/middle/trans.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,8 +1071,8 @@ fn trans_raw_malloc(@block_ctxt cx, TypeRef llptr_ty, ValueRef llsize)
10711071

10721072
fn trans_malloc_without_cleanup(@block_ctxt cx, @ty.t t) -> result {
10731073
auto llty = type_of(cx.fcx.ccx, t);
1074-
auto rslt = size_of(cx, t);
1075-
ret trans_raw_malloc(rslt.bcx, llty, rslt.val);
1074+
auto llsize = llsize_of(llvm.LLVMGetElementType(llty));
1075+
ret trans_raw_malloc(cx, llty, llsize);
10761076
}
10771077

10781078
fn trans_malloc(@block_ctxt cx, @ty.t t) -> result {

0 commit comments

Comments
 (0)