aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2011-03-02 18:36:03 -0800
committerPatrick Walton <[email protected]>2011-03-02 18:36:03 -0800
commit7ab58db4d02443fdfd68e135224a79fe3a212bda (patch)
tree8e8c174b6511b5713c21db2de37850fc48bf4849 /src
parentrustc: Have make_generic_glue pass an opaque type instead of an incorrect typ... (diff)
downloadrust-7ab58db4d02443fdfd68e135224a79fe3a212bda.tar.xz
rust-7ab58db4d02443fdfd68e135224a79fe3a212bda.zip
rustc: Use llsize_of rather than size_of in trans_malloc_without_cleanup(). Should put out burning tinderbox...
Diffstat (limited to 'src')
-rw-r--r--src/comp/middle/trans.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs
index 3d4f44ea..4d1bfde7 100644
--- a/src/comp/middle/trans.rs
+++ b/src/comp/middle/trans.rs
@@ -1071,8 +1071,8 @@ fn trans_raw_malloc(@block_ctxt cx, TypeRef llptr_ty, ValueRef llsize)
fn trans_malloc_without_cleanup(@block_ctxt cx, @ty.t t) -> result {
auto llty = type_of(cx.fcx.ccx, t);
- auto rslt = size_of(cx, t);
- ret trans_raw_malloc(rslt.bcx, llty, rslt.val);
+ auto llsize = llsize_of(llvm.LLVMGetElementType(llty));
+ ret trans_raw_malloc(cx, llty, llsize);
}
fn trans_malloc(@block_ctxt cx, @ty.t t) -> result {