]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/middle/trans/base.rs
add an align parameter to exchange_malloc
[rust.git] / src / librustc / middle / trans / base.rs
index 6c4566c09aa7aabfc40a4bf92b6df01d8d90f992..8f878f099fc41d4e1b5dd6aba4ee5321c9a36b17 100644 (file)
@@ -345,7 +345,8 @@ fn require_alloc_fn(bcx: &Block, info_ty: ty::t, it: LangItem) -> ast::DefId {
 
 pub fn malloc_raw_dyn<'a>(bcx: &'a Block<'a>,
                           ptr_ty: ty::t,
-                          size: ValueRef)
+                          size: ValueRef,
+                          align: ValueRef)
                           -> Result<'a> {
     let _icx = push_ctxt("malloc_raw_exchange");
     let ccx = bcx.ccx();
@@ -353,7 +354,7 @@ pub fn malloc_raw_dyn<'a>(bcx: &'a Block<'a>,
     // Allocate space:
     let r = callee::trans_lang_call(bcx,
         require_alloc_fn(bcx, ptr_ty, ExchangeMallocFnLangItem),
-        [size],
+        [size, align],
         None);
 
     let llty_ptr = type_of::type_of(ccx, ptr_ty);