rustc: Don't always build a constant multiply instruction when translating literal vectors; the size of the referent isn't always constant
This commit is contained in:
parent
533dea772f
commit
f3b58947c0
|
@ -4181,8 +4181,8 @@ fn trans_vec(@block_ctxt cx, vec[@ast.expr] args,
|
|||
auto bcx = cx;
|
||||
auto unit_sz = size_of(bcx, unit_ty);
|
||||
bcx = unit_sz.bcx;
|
||||
auto data_sz = llvm.LLVMConstMul(C_int(_vec.len[@ast.expr](args) as int),
|
||||
unit_sz.val);
|
||||
auto data_sz = bcx.build.Mul(C_int(_vec.len[@ast.expr](args) as int),
|
||||
unit_sz.val);
|
||||
|
||||
// FIXME: pass tydesc properly.
|
||||
auto sub = trans_upcall(bcx, "upcall_new_vec", vec(data_sz, C_int(0)));
|
||||
|
|
Loading…
Reference in New Issue